Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
03a074f7
Commit
03a074f7
authored
Aug 27, 2018
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dry up view by extracting layout template
parent
7d316a9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
61 deletions
+47
-61
app/views/admin/runners/_runner.html.haml
app/views/admin/runners/_runner.html.haml
+43
-61
app/views/admin/runners/_runner_table_cell.html.haml
app/views/admin/runners/_runner_table_cell.html.haml
+4
-0
No files found.
app/views/admin/runners/_runner.html.haml
View file @
03a074f7
.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'
)
-
if
runner
.
instance_type?
.table-mobile-content
%span
.badge.badge-success
shared
-
if
runner
.
instance_type?
-
elsif
runner
.
group_type?
%span
.badge.badge-success
shared
%span
.badge.badge-success
group
-
elsif
runner
.
group_type?
-
else
%span
.badge.badge-success
group
%span
.badge.badge-info
specific
-
else
-
if
runner
.
locked?
%span
.badge.badge-info
specific
%span
.badge.badge-warning
locked
-
if
runner
.
locked?
-
unless
runner
.
active?
%span
.badge.badge-warning
locked
%span
.badge.badge-danger
paused
-
unless
runner
.
active?
%span
.badge.badge-danger
paused
=
render
layout:
'runner_table_cell'
,
locals:
{
label:
_
(
'Runner token'
)
}
do
=
link_to
runner
.
short_sha
,
admin_runner_path
(
runner
)
.table-section.section-10
.table-mobile-header
{
role:
'rowheader'
}=
_
(
'Runner token'
)
=
render
layout:
'runner_table_cell'
,
locals:
{
label:
_
(
'Description'
)
}
do
.table-mobile-content
=
runner
.
description
=
link_to
runner
.
short_sha
,
admin_runner_path
(
runner
)
=
render
layout:
'runner_table_cell'
,
locals:
{
label:
_
(
'Version'
)
}
do
.table-section.section-10
=
runner
.
version
.table-mobile-header
{
role:
'rowheader'
}=
_
(
'Description'
)
.table-mobile-content
=
render
layout:
'runner_table_cell'
,
locals:
{
label:
_
(
'IP Address'
)
}
do
=
runner
.
description
=
runner
.
ip_address
.table-section.section-10
=
render
layout:
'runner_table_cell'
,
locals:
{
label:
_
(
'Projects'
)
}
do
.table-mobile-header
{
role:
'rowheader'
}=
_
(
'Version'
)
-
if
runner
.
instance_type?
||
runner
.
group_type?
.table-mobile-content
=
_
(
'n/a'
)
=
runner
.
version
-
else
=
runner
.
projects
.
count
(
:all
)
.table-section.section-10
.table-mobile-header
{
role:
'rowheader'
}=
_
(
'IP Address'
)
=
render
layout:
'runner_table_cell'
,
locals:
{
label:
_
(
'Jobs'
)
}
do
.table-mobile-content
=
runner
.
builds
.
count
(
:all
)
=
runner
.
ip_address
=
render
layout:
'runner_table_cell'
,
locals:
{
label:
_
(
'Tags'
)
}
do
.table-section.section-10
-
runner
.
tag_list
.
sort
.
each
do
|
tag
|
.table-mobile-header
{
role:
'rowheader'
}=
_
(
'Projects'
)
%span
.badge.badge-primary
.table-mobile-content
=
tag
-
if
runner
.
instance_type?
||
runner
.
group_type?
=
_
(
'n/a'
)
=
render
layout:
'runner_table_cell'
,
locals:
{
label:
_
(
'Last contact'
)
}
do
-
else
-
if
runner
.
contacted_at
=
runner
.
projects
.
count
(
:all
)
=
time_ago_with_tooltip
runner
.
contacted_at
-
else
.table-section.section-10
=
_
(
'Never'
)
.table-mobile-header
{
role:
'rowheader'
}=
_
(
'Jobs'
)
.table-mobile-content
=
runner
.
builds
.
count
(
:all
)
.table-section.section-10
.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
...
...
app/views/admin/runners/_runner_table_cell.html.haml
0 → 100644
View file @
03a074f7
.table-section.section-10
.table-mobile-header
{
role:
'rowheader'
}=
label
.table-mobile-content
=
yield
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment