debian-mirror-gitlab/app/views/admin/runners/_runner.html.haml

81 lines
3.7 KiB
Text
Raw Normal View History

2021-04-29 21:17:54 +05:30
-# Note: This file should stay aligned with:
-# `app/views/groups/runners/_runner.html.haml`
2018-12-05 23:21:45 +05:30
.gl-responsive-table-row{ id: dom_id(runner) }
.table-section.section-10.section-wrap
.table-mobile-header{ role: 'rowheader' }= _('Type')
.table-mobile-content
- if runner.instance_type?
2021-04-29 21:17:54 +05:30
%span.badge.badge-pill.gl-badge.sm.badge-success= _("shared")
2018-12-05 23:21:45 +05:30
- elsif runner.group_type?
2021-04-29 21:17:54 +05:30
%span.badge.badge-pill.gl-badge.sm.badge-success= _("group")
2015-09-25 12:07:36 +05:30
- else
2021-04-29 21:17:54 +05:30
%span.badge.badge-pill.gl-badge.sm.badge-info= _("specific")
2018-12-05 23:21:45 +05:30
- if runner.locked?
2021-04-29 21:17:54 +05:30
%span.badge.badge-pill.gl-badge.sm.badge-warning= _("locked")
2018-12-05 23:21:45 +05:30
- unless runner.active?
2021-04-29 21:17:54 +05:30
%span.badge.badge-pill.gl-badge.sm.badge-danger= _("paused")
2018-12-05 23:21:45 +05:30
2021-04-29 21:17:54 +05:30
.table-section.section-30
.table-mobile-header{ role: 'rowheader' }= s_('Runners|Runner')
2018-12-05 23:21:45 +05:30
.table-mobile-content
2021-04-29 21:17:54 +05:30
= link_to("##{runner.id} (#{runner.short_sha})", admin_runner_path(runner))
.gl-text-truncate
%span{ title: runner.description, data: { toggle: 'tooltip', container: 'body' } }
= runner.description
2018-12-05 23:21:45 +05:30
2019-03-02 22:35:43 +05:30
.table-section.section-10
2018-12-05 23:21:45 +05:30
.table-mobile-header{ role: 'rowheader' }= _('Version')
.table-mobile-content.str-truncated.has-tooltip{ title: runner.version }
= runner.version
.table-section.section-10
.table-mobile-header{ role: 'rowheader' }= _('IP Address')
2019-03-02 22:35:43 +05:30
.table-mobile-content.str-truncated.has-tooltip{ title: runner.ip_address }
2018-12-05 23:21:45 +05:30
= runner.ip_address
.table-section.section-5
.table-mobile-header{ role: 'rowheader' }= _('Projects')
.table-mobile-content
- if runner.instance_type? || runner.group_type?
= _('n/a')
- else
= runner.projects.count(:all)
.table-section.section-5
.table-mobile-header{ role: 'rowheader' }= _('Jobs')
.table-mobile-content
2019-07-07 11:18:12 +05:30
= limited_counter_with_delimiter(runner.builds)
2018-12-05 23:21:45 +05:30
.table-section.section-10.section-wrap
.table-mobile-header{ role: 'rowheader' }= _('Tags')
.table-mobile-content
2019-07-07 11:18:12 +05:30
- runner.tags.map(&:name).sort.each do |tag|
%span.badge.badge-primary.str-truncated.has-tooltip{ title: tag }
2018-12-05 23:21:45 +05:30
= tag
.table-section.section-10
.table-mobile-header{ role: 'rowheader' }= _('Last contact')
.table-mobile-content
2019-02-15 15:39:39 +05:30
- contacted_at = runner_contacted_at(runner)
- if contacted_at
= time_ago_with_tooltip contacted_at
2018-12-05 23:21:45 +05:30
- else
= _('Never')
.table-section.table-button-footer.section-10
.btn-group.table-action-buttons
.btn-group
2021-04-29 21:17:54 +05:30
= link_to admin_runner_path(runner), class: 'gl-button btn btn-default btn-icon has-tooltip', title: _('Edit'), ref: 'tooltip', aria: { label: _('Edit') }, data: { placement: 'top', container: 'body'} do
= sprite_icon('pencil', css_class: 'gl-icon')
2018-12-05 23:21:45 +05:30
.btn-group
- if runner.active?
2021-04-29 21:17:54 +05:30
= link_to [:pause, :admin, runner], method: :post, class: 'gl-button btn btn-default btn-icon has-tooltip', title: _('Pause'), ref: 'tooltip', aria: { label: _('Pause') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do
= sprite_icon('pause', css_class: 'gl-icon')
2018-12-05 23:21:45 +05:30
- else
2021-04-29 21:17:54 +05:30
= link_to [:resume, :admin, runner], method: :post, class: 'gl-button btn btn-default btn-icon has-tooltip gl-px-3', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do
= sprite_icon('play', css_class: 'gl-icon')
2018-12-05 23:21:45 +05:30
.btn-group
2021-04-29 21:17:54 +05:30
= link_to [:admin, runner], method: :delete, class: 'gl-button btn btn-danger btn-icon has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do
= sprite_icon('close', css_class: 'gl-icon')