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

89 lines
4.1 KiB
Text
Raw Normal View History

2021-04-29 21:17:54 +05:30
-# Note: This file should stay aligned with:
-# `app/views/admin/runners/_runner.html.haml`
2020-07-28 23:09:34 +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.group_type?
2021-04-29 21:17:54 +05:30
%span.badge.badge-pill.gl-badge.sm.badge-success
2020-07-28 23:09:34 +05:30
= _('group')
- else
2021-04-29 21:17:54 +05:30
%span.badge.badge-pill.gl-badge.sm.badge-info
2020-07-28 23:09:34 +05:30
= _('specific')
- if runner.locked?
2021-04-29 21:17:54 +05:30
%span.badge.badge-pill.gl-badge.sm.badge-warning
2020-07-28 23:09:34 +05:30
= _('locked')
- unless runner.active?
2021-04-29 21:17:54 +05:30
%span.badge.badge-pill.gl-badge.sm.badge-danger
2020-07-28 23:09:34 +05:30
= _('paused')
2021-04-29 21:17:54 +05:30
.table-section.section-30
.table-mobile-header{ role: 'rowheader' }= s_('Runners|Runner')
2020-07-28 23:09:34 +05:30
.table-mobile-content
2021-04-29 21:17:54 +05:30
= link_to("##{runner.id} (#{runner.short_sha})", group_runner_path(@group, runner))
.gl-text-truncate
%span{ title: runner.description, data: { toggle: 'tooltip', container: 'body' } }
= runner.description
2018-10-15 14:42:47 +05:30
2020-07-28 23:09:34 +05:30
.table-section.section-10
.table-mobile-header{ role: 'rowheader' }= _('Version')
.table-mobile-content.str-truncated.has-tooltip{ title: runner.version }
= runner.version
2018-10-15 14:42:47 +05:30
2020-07-28 23:09:34 +05:30
.table-section.section-10
.table-mobile-header{ role: 'rowheader' }= _('IP Address')
.table-mobile-content.str-truncated.has-tooltip{ title: runner.ip_address }
= runner.ip_address
2018-10-15 14:42:47 +05:30
2020-07-28 23:09:34 +05:30
.table-section.section-5
.table-mobile-header{ role: 'rowheader' }= _('Projects')
.table-mobile-content
- if runner.group_type?
= _('n/a')
2018-10-15 14:42:47 +05:30
- else
2020-07-28 23:09:34 +05:30
= runner.projects.count(:all)
.table-section.section-5
.table-mobile-header{ role: 'rowheader' }= _('Jobs')
.table-mobile-content
= limited_counter_with_delimiter(runner.builds)
.table-section.section-10.section-wrap
.table-mobile-header{ role: 'rowheader' }= _('Tags')
.table-mobile-content
- runner.tags.map(&:name).sort.each do |tag|
%span.badge.badge-primary.str-truncated.has-tooltip{ title: tag }
2018-10-15 14:42:47 +05:30
= tag
2020-07-28 23:09:34 +05:30
.table-section.section-10
.table-mobile-header{ role: 'rowheader' }= _('Last contact')
.table-mobile-content
- contacted_at = runner_contacted_at(runner)
- if contacted_at
= time_ago_with_tooltip contacted_at
- 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 edit_group_runner_path(@group, 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')
2020-07-28 23:09:34 +05:30
.btn-group
- if runner.active?
2021-04-29 21:17:54 +05:30
= link_to pause_group_runner_path(@group, 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')
2020-07-28 23:09:34 +05:30
- else
2021-04-29 21:17:54 +05:30
= link_to resume_group_runner_path(@group, runner), method: :post, class: 'gl-button btn btn-default btn-icon has-tooltip', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do
= sprite_icon('play', css_class: 'gl-icon')
2020-07-28 23:09:34 +05:30
- if runner.belongs_to_more_than_one_project?
2021-03-11 19:13:27 +05:30
- delete_runner_tooltip = _('Multi-project Runners cannot be removed')
.btn-group.has-tooltip{ data: { container: 'body', placement: 'top' }, title: delete_runner_tooltip }
2021-04-29 21:17:54 +05:30
.gl-button.btn.btn-danger.btn-icon{ 'aria-label' => delete_runner_tooltip, disabled: 'disabled' }
= sprite_icon('close', css_class: 'gl-icon')
2020-07-28 23:09:34 +05:30
- else
.btn-group
2021-04-29 21:17:54 +05:30
= link_to group_runner_path(@group, 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')