diff options
Diffstat (limited to 'app/views/groups/runners')
-rw-r--r-- | app/views/groups/runners/_group_runners.html.haml | 2 | ||||
-rw-r--r-- | app/views/groups/runners/_index.html.haml | 19 | ||||
-rw-r--r-- | app/views/groups/runners/_runner.html.haml | 45 | ||||
-rw-r--r-- | app/views/groups/runners/edit.html.haml | 11 |
4 files changed, 40 insertions, 37 deletions
diff --git a/app/views/groups/runners/_group_runners.html.haml b/app/views/groups/runners/_group_runners.html.haml index f60cdc9f8da..910b36770f1 100644 --- a/app/views/groups/runners/_group_runners.html.haml +++ b/app/views/groups/runners/_group_runners.html.haml @@ -19,5 +19,5 @@ type: 'group', reset_token_url: reset_registration_token_group_settings_ci_cd_path, project_path: '', - group_path: @group.path } + group_path: @group.full_path } %br diff --git a/app/views/groups/runners/_index.html.haml b/app/views/groups/runners/_index.html.haml index 7cbc709ecf8..187588f5f11 100644 --- a/app/views/groups/runners/_index.html.haml +++ b/app/views/groups/runners/_index.html.haml @@ -19,7 +19,7 @@ .filtered-search-box = dropdown_tag(_('Recent searches'), options: { wrapper_class: 'filtered-search-history-dropdown-wrapper', - toggle_class: 'btn filtered-search-history-dropdown-toggle-button', + toggle_class: 'gl-button btn btn-default filtered-search-history-dropdown-toggle-button', dropdown_class: 'filtered-search-history-dropdown', content_class: 'filtered-search-history-dropdown-content' }) do .js-filtered-search-history-dropdown{ data: { full_path: group_settings_ci_cd_path } } @@ -31,7 +31,7 @@ #js-dropdown-hint.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %li.filter-dropdown-item{ data: {hint: "#{'{{hint}}'}", tag: "#{'{{tag}}'}", action: "#{'{{hint === \'search\' ? \'submit\' : \'\' }}'}" } } - = button_tag class: 'btn btn-link' do + = button_tag class: 'gl-button btn btn-link' do -# Encapsulate static class name `{{icon}}` inside #{} to bypass -# haml lint's ClassAttributeWithStaticValue %svg @@ -41,7 +41,7 @@ #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } } %li.filter-dropdown-item{ data: { value: "{{ title }}" } } - = button_tag class: 'btn btn-link' do + = button_tag class: 'gl-button btn btn-link' do {{ title }} %span.btn-helptext {{ help }} @@ -49,7 +49,7 @@ %ul{ data: { dropdown: true } } - Ci::Runner::AVAILABLE_STATUSES.each do |status| %li.filter-dropdown-item{ data: { value: status } } - = button_tag class: 'btn btn-link' do + = button_tag class: 'gl-button btn btn-link' do = status.titleize #js-dropdown-admin-runner-type.filtered-search-input-dropdown-menu.dropdown-menu @@ -57,18 +57,18 @@ - Ci::Runner::AVAILABLE_TYPES.each do |runner_type| - next if runner_type == 'instance_type' %li.filter-dropdown-item{ data: { value: runner_type } } - = button_tag class: 'btn btn-link' do + = button_tag class: 'gl-button btn btn-link' do = runner_type.titleize #js-dropdown-runner-tag.filtered-search-input-dropdown-menu.dropdown-menu %ul{ data: { dropdown: true } } %li.filter-dropdown-item{ data: { value: 'none' } } - = button_tag class: 'btn btn-link' do + = button_tag class: 'gl-button btn btn-link' do = _('No Tag') %li.divider.droplab-item-ignore %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %li.filter-dropdown-item - = button_tag class: 'btn btn-link js-data-value' do + = button_tag class: 'gl-button btn btn-link js-data-value' do %span.dropdown-light-content {{name}} @@ -82,12 +82,11 @@ - if @group_runners.any? - .runners-content.content-list + .content-list{ data: { testid: 'runners-table' } } .table-holder .gl-responsive-table-row.table-row-header{ role: 'row' } .table-section.section-10{ role: 'rowheader' }= _('Type/State') - .table-section.section-10{ role: 'rowheader' }= _('Runner token') - .table-section.section-20{ role: 'rowheader' }= _('Description') + .table-section.section-30{ role: 'rowheader' }= s_('Runners|Runner') .table-section.section-10{ role: 'rowheader' }= _('Version') .table-section.section-10{ role: 'rowheader' }= _('IP Address') .table-section.section-5{ role: 'rowheader' }= _('Projects') diff --git a/app/views/groups/runners/_runner.html.haml b/app/views/groups/runners/_runner.html.haml index 80739395713..89e32c0999c 100644 --- a/app/views/groups/runners/_runner.html.haml +++ b/app/views/groups/runners/_runner.html.haml @@ -1,29 +1,30 @@ +-# Note: This file should stay aligned with: +-# `app/views/admin/runners/_runner.html.haml` + .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? - %span.badge.badge-success + %span.badge.badge-pill.gl-badge.sm.badge-success = _('group') - else - %span.badge.badge-info + %span.badge.badge-pill.gl-badge.sm.badge-info = _('specific') - if runner.locked? - %span.badge.badge-warning + %span.badge.badge-pill.gl-badge.sm.badge-warning = _('locked') - unless runner.active? - %span.badge.badge-danger + %span.badge.badge-pill.gl-badge.sm.badge-danger = _('paused') - .table-section.section-10 - .table-mobile-header{ role: 'rowheader' }= _('Runner token') + .table-section.section-30 + .table-mobile-header{ role: 'rowheader' }= s_('Runners|Runner') .table-mobile-content - = link_to runner.short_sha, group_runner_path(@group, runner) - - .table-section.section-20 - .table-mobile-header{ role: 'rowheader' }= _('Description') - .table-mobile-content.str-truncated.has-tooltip{ title: runner.description } - = runner.description + = 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 .table-section.section-10 .table-mobile-header{ role: 'rowheader' }= _('Version') @@ -67,21 +68,21 @@ .table-section.table-button-footer.section-10 .btn-group.table-action-buttons .btn-group - = link_to edit_group_runner_path(@group, runner), class: 'btn btn-default has-tooltip', title: _('Edit'), ref: 'tooltip', aria: { label: _('Edit') }, data: { placement: 'top', container: 'body'} do - = sprite_icon('pencil') + = 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') .btn-group - if runner.active? - = link_to pause_group_runner_path(@group, runner), method: :post, class: 'btn btn-default has-tooltip', title: _('Pause'), ref: 'tooltip', aria: { label: _('Pause') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do - = sprite_icon('pause') + = 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') - else - = link_to resume_group_runner_path(@group, runner), method: :post, class: 'btn btn-default has-tooltip', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do - = sprite_icon('play') + = 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') - if runner.belongs_to_more_than_one_project? - delete_runner_tooltip = _('Multi-project Runners cannot be removed') .btn-group.has-tooltip{ data: { container: 'body', placement: 'top' }, title: delete_runner_tooltip } - .btn.btn-danger{ 'aria-label' => delete_runner_tooltip, disabled: 'disabled' } - = sprite_icon('close') + .gl-button.btn.btn-danger.btn-icon{ 'aria-label' => delete_runner_tooltip, disabled: 'disabled' } + = sprite_icon('close', css_class: 'gl-icon') - else .btn-group - = link_to group_runner_path(@group, runner), method: :delete, class: 'btn btn-danger has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do - = sprite_icon('close') + = 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') diff --git a/app/views/groups/runners/edit.html.haml b/app/views/groups/runners/edit.html.haml index fcd096eeaa0..3794c345aa6 100644 --- a/app/views/groups/runners/edit.html.haml +++ b/app/views/groups/runners/edit.html.haml @@ -1,6 +1,9 @@ -- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", 'Runners' +- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('Runners') -%h4 Runner ##{@runner.id} +%h2.page-title + = s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id }) + = render 'shared/runners/runner_type_badge', runner: @runner -%hr - = render 'shared/runners/form', runner: @runner, runner_form_url: group_runner_path(@group, @runner) += render 'shared/runners/runner_type_alert', runner: @runner + += render 'shared/runners/form', runner: @runner, runner_form_url: group_runner_path(@group, @runner) |