BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4ec95dc4
Commit
4ec95dc4
authored
May 04, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Share _form and show for project, instance and group runners
parent
bb7597ef
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10 additions
and
109 deletions
+10
-109
runners_controller.rb
app/controllers/groups/runners_controller.rb
+1
-0
runners_controller.rb
app/controllers/projects/runners_controller.rb
+1
-0
show.html.haml
app/views/admin/runners/show.html.haml
+1
-1
_form.html.haml
app/views/groups/runners/_form.html.haml
+0
-49
edit.html.haml
app/views/groups/runners/edit.html.haml
+1
-1
show.html.haml
app/views/groups/runners/show.html.haml
+0
-57
edit.html.haml
app/views/projects/runners/edit.html.haml
+1
-1
_form.html.haml
app/views/shared/runners/_form.html.haml
+1
-0
show.html.haml
app/views/shared/runners/show.html.haml
+4
-0
No files found.
app/controllers/groups/runners_controller.rb
View file @
4ec95dc4
...
@@ -3,6 +3,7 @@ class Groups::RunnersController < Groups::ApplicationController
...
@@ -3,6 +3,7 @@ class Groups::RunnersController < Groups::ApplicationController
before_action
:set_runner
,
only:
[
:edit
,
:update
,
:destroy
,
:pause
,
:resume
,
:show
]
before_action
:set_runner
,
only:
[
:edit
,
:update
,
:destroy
,
:pause
,
:resume
,
:show
]
def
show
def
show
render
'shared/runners/show'
end
end
def
edit
def
edit
...
...
app/controllers/projects/runners_controller.rb
View file @
4ec95dc4
...
@@ -44,6 +44,7 @@ class Projects::RunnersController < Projects::ApplicationController
...
@@ -44,6 +44,7 @@ class Projects::RunnersController < Projects::ApplicationController
end
end
def
show
def
show
render
'shared/runners/show'
end
end
def
toggle_shared_runners
def
toggle_shared_runners
...
...
app/views/admin/runners/show.html.haml
View file @
4ec95dc4
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
%hr
%hr
.append-bottom-20
.append-bottom-20
=
render
'
/projects
/runners/form'
,
runner:
@runner
,
runner_form_url:
admin_runner_path
(
@runner
)
=
render
'
shared
/runners/form'
,
runner:
@runner
,
runner_form_url:
admin_runner_path
(
@runner
)
.row
.row
.col-md-6
.col-md-6
...
...
app/views/groups/runners/_form.html.haml
deleted
100644 → 0
View file @
bb7597ef
=
form_for
runner
,
url:
runner_form_url
,
html:
{
class:
'form-horizontal'
}
do
|
f
|
=
form_errors
(
runner
)
.form-group
=
label
:active
,
"Active"
,
class:
'control-label'
.col-sm-10
.checkbox
=
f
.
check_box
:active
%span
.light
Paused Runners don't accept new jobs
.form-group
=
label
:protected
,
"Protected"
,
class:
'control-label'
.col-sm-10
.checkbox
=
f
.
check_box
:access_level
,
{},
'ref_protected'
,
'not_protected'
%span
.light
This runner will only run on pipelines triggered on protected branches
.form-group
=
label
:run_untagged
,
'Run untagged jobs'
,
class:
'control-label'
.col-sm-10
.checkbox
=
f
.
check_box
:run_untagged
%span
.light
Indicates whether this runner can pick jobs without tags
.form-group
=
label_tag
:token
,
class:
'control-label'
do
Token
.col-sm-10
=
f
.
text_field
:token
,
class:
'form-control'
,
readonly:
true
.form-group
=
label_tag
:ip_address
,
class:
'control-label'
do
IP Address
.col-sm-10
=
f
.
text_field
:ip_address
,
class:
'form-control'
,
readonly:
true
.form-group
=
label_tag
:description
,
class:
'control-label'
do
Description
.col-sm-10
=
f
.
text_field
:description
,
class:
'form-control'
.form-group
=
label_tag
:maximum_timeout_human_readable
,
class:
'control-label'
do
Maximum job timeout
.col-sm-10
=
f
.
text_field
:maximum_timeout_human_readable
,
class:
'form-control'
.help-block
This timeout will take precedence when lower than Project-defined timeout
.form-group
=
label_tag
:tag_list
,
class:
'control-label'
do
Tags
.col-sm-10
=
f
.
text_field
:tag_list
,
value:
runner
.
tag_list
.
sort
.
join
(
', '
),
class:
'form-control'
.help-block
You can setup jobs to only use Runners with specific tags. Separate tags with commas.
.form-actions
=
f
.
submit
'Save changes'
,
class:
'btn btn-save'
app/views/groups/runners/edit.html.haml
View file @
4ec95dc4
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
%h4
Runner ##{@runner.id}
%h4
Runner ##{@runner.id}
%hr
%hr
=
render
'form'
,
runner:
@runner
,
runner_form_url:
group_runner_path
(
@group
,
@runner
)
=
render
'
shared/runners/
form'
,
runner:
@runner
,
runner_form_url:
group_runner_path
(
@group
,
@runner
)
app/views/groups/runners/show.html.haml
deleted
100644 → 0
View file @
bb7597ef
-
page_title
"
#{
@runner
.
description
}
#
#{
@runner
.
id
}
"
,
"Runners"
%h3
.page-title
Runner ##{@runner.id}
.table-holder
%table
.table
%thead
%tr
%th
Property Name
%th
Value
%tr
%td
Active
%td
=
@runner
.
active?
?
'Yes'
:
'No'
%tr
%td
Protected
%td
=
@runner
.
ref_protected?
?
'Yes'
:
'No'
%tr
%td
Can run untagged jobs
%td
=
@runner
.
run_untagged?
?
'Yes'
:
'No'
%tr
%td
Tags
%td
-
@runner
.
tag_list
.
sort
.
each
do
|
tag
|
%span
.label.label-primary
=
tag
%tr
%td
Name
%td
=
@runner
.
name
%tr
%td
Version
%td
=
@runner
.
version
%tr
%td
IP Address
%td
=
@runner
.
ip_address
%tr
%td
Revision
%td
=
@runner
.
revision
%tr
%td
Platform
%td
=
@runner
.
platform
%tr
%td
Architecture
%td
=
@runner
.
architecture
%tr
%td
Description
%td
=
@runner
.
description
%tr
%td
Maximum job timeout
%td
=
@runner
.
maximum_timeout_human_readable
%tr
%td
Last contact
%td
-
if
@runner
.
contacted_at
=
time_ago_with_tooltip
@runner
.
contacted_at
-
else
Never
app/views/projects/runners/edit.html.haml
View file @
4ec95dc4
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
%h4
Runner ##{@runner.id}
%h4
Runner ##{@runner.id}
%hr
%hr
=
render
'form'
,
runner:
@runner
,
runner_form_url:
project_runner_path
(
@project
,
@runner
)
=
render
'
shared/runners/
form'
,
runner:
@runner
,
runner_form_url:
project_runner_path
(
@project
,
@runner
)
app/views/
projects
/runners/_form.html.haml
→
app/views/
shared
/runners/_form.html.haml
View file @
4ec95dc4
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
.checkbox
.checkbox
=
f
.
check_box
:run_untagged
=
f
.
check_box
:run_untagged
%span
.light
Indicates whether this runner can pick jobs without tags
%span
.light
Indicates whether this runner can pick jobs without tags
-
unless
runner
.
group_type?
.form-group
.form-group
=
label
:locked
,
'Lock to current projects'
,
class:
'control-label'
=
label
:locked
,
'Lock to current projects'
,
class:
'control-label'
.col-sm-10
.col-sm-10
...
...
app/views/
projects
/runners/show.html.haml
→
app/views/
shared
/runners/show.html.haml
View file @
4ec95dc4
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
-
if
@runner
.
shared?
-
if
@runner
.
shared?
%span
.runner-state.runner-state-shared
%span
.runner-state.runner-state-shared
Shared
Shared
-
elsif
@runner
.
group_type?
%span
.runner-state.runner-state-shared
Group
-
else
-
else
%span
.runner-state.runner-state-specific
%span
.runner-state.runner-state-specific
Specific
Specific
...
@@ -25,6 +28,7 @@
...
@@ -25,6 +28,7 @@
%tr
%tr
%td
Can run untagged jobs
%td
Can run untagged jobs
%td
=
@runner
.
run_untagged?
?
'Yes'
:
'No'
%td
=
@runner
.
run_untagged?
?
'Yes'
:
'No'
-
unless
@runner
.
group_type?
%tr
%tr
%td
Locked to this project
%td
Locked to this project
%td
=
@runner
.
locked?
?
'Yes'
:
'No'
%td
=
@runner
.
locked?
?
'Yes'
:
'No'
...
...
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