Commit 4185d4ba authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch '51549-runners-table' into 'master'

Fixes Admin Runners table not wrapping the content

Closes #51549

See merge request gitlab-org/gitlab-ce!21802
parents 00057a75 093394bf
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
.table-section { .table-section {
white-space: nowrap; white-space: nowrap;
$section-widths: 10 15 20 25 30 40 50 100; $section-widths: 5 10 15 20 25 30 40 50 100;
@each $width in $section-widths { @each $width in $section-widths {
&.section-#{$width} { &.section-#{$width} {
flex: 0 0 #{$width + '%'}; flex: 0 0 #{$width + '%'};
......
.gl-responsive-table-row{ id: dom_id(runner) } .gl-responsive-table-row{ id: dom_id(runner) }
= render layout: 'runner_table_cell', locals: { label: _('Type') } do .table-section.section-10.section-wrap
- if runner.instance_type? .table-mobile-header{ role: 'rowheader' }= _('Type')
%span.badge.badge-success shared .table-mobile-content
- elsif runner.group_type? - if runner.instance_type?
%span.badge.badge-success group %span.badge.badge-success shared
- else - elsif runner.group_type?
%span.badge.badge-info specific %span.badge.badge-success group
- if runner.locked? - else
%span.badge.badge-warning locked %span.badge.badge-info specific
- unless runner.active? - if runner.locked?
%span.badge.badge-danger paused %span.badge.badge-warning locked
- unless runner.active?
= render layout: 'runner_table_cell', locals: { label: _('Runner token') } do %span.badge.badge-danger paused
= link_to runner.short_sha, admin_runner_path(runner)
.table-section.section-10
= render layout: 'runner_table_cell', locals: { label: _('Description') } do .table-mobile-header{ role: 'rowheader' }= _('Runner token')
= runner.description .table-mobile-content
= link_to runner.short_sha, admin_runner_path(runner)
= render layout: 'runner_table_cell', locals: { label: _('Version') } do
= runner.version .table-section.section-15
.table-mobile-header{ role: 'rowheader' }= _('Description')
= render layout: 'runner_table_cell', locals: { label: _('IP Address') } do .table-mobile-content.str-truncated.has-tooltip{ title: runner.description }
= runner.ip_address = runner.description
= render layout: 'runner_table_cell', locals: { label: _('Projects') } do .table-section.section-15
- if runner.instance_type? || runner.group_type? .table-mobile-header{ role: 'rowheader' }= _('Version')
= _('n/a') .table-mobile-content.str-truncated.has-tooltip{ title: runner.version }
- else = runner.version
= runner.projects.count(:all)
.table-section.section-10
= render layout: 'runner_table_cell', locals: { label: _('Jobs') } do .table-mobile-header{ role: 'rowheader' }= _('IP Address')
= runner.builds.count(:all) .table-mobile-content
= runner.ip_address
= render layout: 'runner_table_cell', locals: { label: _('Tags') } do
- runner.tag_list.sort.each do |tag| .table-section.section-5
%span.badge.badge-primary .table-mobile-header{ role: 'rowheader' }= _('Projects')
= tag .table-mobile-content
- if runner.instance_type? || runner.group_type?
= render layout: 'runner_table_cell', locals: { label: _('Last contact') } do = _('n/a')
- if runner.contacted_at - else
= time_ago_with_tooltip runner.contacted_at = runner.projects.count(:all)
- else
= _('Never') .table-section.section-5
.table-mobile-header{ role: 'rowheader' }= _('Jobs')
.table-mobile-content
= runner.builds.count(:all)
.table-section.section-10.section-wrap
.table-mobile-header{ role: 'rowheader' }= _('Tags')
.table-mobile-content
- runner.tag_list.sort.each do |tag|
%span.badge.badge-primary
= tag
.table-section.section-10
.table-mobile-header{ role: 'rowheader' }= _('Last contact')
.table-mobile-content
- if runner.contacted_at
= time_ago_with_tooltip runner.contacted_at
- else
= _('Never')
.table-section.table-button-footer.section-10 .table-section.table-button-footer.section-10
.btn-group.table-action-buttons .btn-group.table-action-buttons
......
.table-section.section-10
.table-mobile-header{ role: 'rowheader' }= label
.table-mobile-content
= yield
...@@ -98,8 +98,16 @@ ...@@ -98,8 +98,16 @@
.runners-content.content-list .runners-content.content-list
.table-holder .table-holder
.gl-responsive-table-row.table-row-header{ role: 'row' } .gl-responsive-table-row.table-row-header{ role: 'row' }
- [_('Type'), _('Runner token'), _('Description'), _('Version'), _('IP Address'), _('Projects'), _('Jobs'), _('Tags'), _('Last contact')].each do |label| .table-section.section-10{ role: 'rowheader' }= _('Type')
.table-section.section-10{ role: 'rowheader' }= label .table-section.section-10{ role: 'rowheader' }= _('Runner token')
.table-section.section-15{ role: 'rowheader' }= _('Description')
.table-section.section-15{ role: 'rowheader' }= _('Version')
.table-section.section-10{ role: 'rowheader' }= _('IP Address')
.table-section.section-5{ role: 'rowheader' }= _('Projects')
.table-section.section-5{ role: 'rowheader' }= _('Jobs')
.table-section.section-10{ role: 'rowheader' }= _('Tags')
.table-section.section-10{ role: 'rowheader' }= _('Last contact')
.table-section.section-10{ role: 'rowheader' }
- @runners.each do |runner| - @runners.each do |runner|
= render 'admin/runners/runner', runner: runner = render 'admin/runners/runner', runner: runner
......
---
title: Fixes admin runners table not wrapping content
merge_request:
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment