Commit 03a074f7 authored by Alexis Reigel's avatar Alexis Reigel

dry up view by extracting layout template

parent 7d316a9b
.gl-responsive-table-row{ id: dom_id(runner) } .gl-responsive-table-row{ id: dom_id(runner) }
.table-section.section-10 = render layout: 'runner_table_cell', locals: { label: _('Type') } do
.table-mobile-header{ role: 'rowheader' }= _('Type')
.table-mobile-content
- if runner.instance_type? - if runner.instance_type?
%span.badge.badge-success shared %span.badge.badge-success shared
- elsif runner.group_type? - elsif runner.group_type?
...@@ -13,49 +11,33 @@ ...@@ -13,49 +11,33 @@
- unless runner.active? - unless runner.active?
%span.badge.badge-danger paused %span.badge.badge-danger paused
.table-section.section-10 = render layout: 'runner_table_cell', locals: { label: _('Runner token') } do
.table-mobile-header{ role: 'rowheader' }= _('Runner token')
.table-mobile-content
= link_to runner.short_sha, admin_runner_path(runner) = 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' }= _('Description')
.table-mobile-content
= runner.description = runner.description
.table-section.section-10 = render layout: 'runner_table_cell', locals: { label: _('Version') } do
.table-mobile-header{ role: 'rowheader' }= _('Version')
.table-mobile-content
= runner.version = runner.version
.table-section.section-10 = render layout: 'runner_table_cell', locals: { label: _('IP Address') } do
.table-mobile-header{ role: 'rowheader' }= _('IP Address')
.table-mobile-content
= runner.ip_address = runner.ip_address
.table-section.section-10 = render layout: 'runner_table_cell', locals: { label: _('Projects') } do
.table-mobile-header{ role: 'rowheader' }= _('Projects')
.table-mobile-content
- if runner.instance_type? || runner.group_type? - if runner.instance_type? || runner.group_type?
= _('n/a') = _('n/a')
- else - else
= runner.projects.count(:all) = runner.projects.count(:all)
.table-section.section-10 = render layout: 'runner_table_cell', locals: { label: _('Jobs') } do
.table-mobile-header{ role: 'rowheader' }= _('Jobs')
.table-mobile-content
= runner.builds.count(:all) = runner.builds.count(:all)
.table-section.section-10 = render layout: 'runner_table_cell', locals: { label: _('Tags') } do
.table-mobile-header{ role: 'rowheader' }= _('Tags')
.table-mobile-content
- runner.tag_list.sort.each do |tag| - runner.tag_list.sort.each do |tag|
%span.badge.badge-primary %span.badge.badge-primary
= tag = tag
.table-section.section-10 = render layout: 'runner_table_cell', locals: { label: _('Last contact') } do
.table-mobile-header{ role: 'rowheader' }= _('Last contact')
.table-mobile-content
- if runner.contacted_at - if runner.contacted_at
= time_ago_with_tooltip runner.contacted_at = time_ago_with_tooltip runner.contacted_at
- else - else
......
.table-section.section-10
.table-mobile-header{ role: 'rowheader' }= label
.table-mobile-content
= yield
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