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
Jérome Perrin
gitlab-ce
Commits
397a69f8
Commit
397a69f8
authored
Jun 28, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow admins to assign locked runners:
And show information about locked status. Help! This looks bad :o
parent
b5c8d58a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
app/controllers/admin/runner_projects_controller.rb
app/controllers/admin/runner_projects_controller.rb
+0
-2
app/views/admin/runners/_runner.html.haml
app/views/admin/runners/_runner.html.haml
+2
-0
app/views/admin/runners/index.html.haml
app/views/admin/runners/index.html.haml
+3
-0
app/views/admin/runners/show.html.haml
app/views/admin/runners/show.html.haml
+3
-0
No files found.
app/controllers/admin/runner_projects_controller.rb
View file @
397a69f8
...
@@ -4,8 +4,6 @@ class Admin::RunnerProjectsController < Admin::ApplicationController
...
@@ -4,8 +4,6 @@ class Admin::RunnerProjectsController < Admin::ApplicationController
def
create
def
create
@runner
=
Ci
::
Runner
.
find
(
params
[
:runner_project
][
:runner_id
])
@runner
=
Ci
::
Runner
.
find
(
params
[
:runner_project
][
:runner_id
])
return
head
(
403
)
if
@runner
.
locked?
runner_project
=
@runner
.
assign_to
(
@project
,
current_user
)
runner_project
=
@runner
.
assign_to
(
@project
,
current_user
)
if
runner_project
.
persisted?
if
runner_project
.
persisted?
...
...
app/views/admin/runners/_runner.html.haml
View file @
397a69f8
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
%span
.label.label-success
shared
%span
.label.label-success
shared
-
else
-
else
%span
.label.label-info
specific
%span
.label.label-info
specific
-
if
runner
.
locked?
%span
.label.label-danger
locked
-
unless
runner
.
active?
-
unless
runner
.
active?
%span
.label.label-danger
paused
%span
.label.label-danger
paused
...
...
app/views/admin/runners/index.html.haml
View file @
397a69f8
...
@@ -39,6 +39,9 @@
...
@@ -39,6 +39,9 @@
%li
%li
%span
.label.label-info
specific
%span
.label.label-info
specific
\- run builds from assigned projects
\- run builds from assigned projects
%li
%span
.label.label-danger
locked
\- runner cannot be assigned to other projects
%li
%li
%span
.label.label-danger
paused
%span
.label.label-danger
paused
\- runner will not receive any new builds
\- runner will not receive any new builds
...
...
app/views/admin/runners/show.html.haml
View file @
397a69f8
...
@@ -64,6 +64,9 @@
...
@@ -64,6 +64,9 @@
=
project
.
name_with_namespace
=
project
.
name_with_namespace
%td
%td
.pull-right
.pull-right
-
if
@runner
.
locked?
=
icon
(
'lock'
,
class:
'has-tooltip'
,
title:
'Locked to current projects'
)
=
form_for
[
:admin
,
project
.
namespace
.
becomes
(
Namespace
),
project
,
project
.
runner_projects
.
new
]
do
|
f
|
=
form_for
[
:admin
,
project
.
namespace
.
becomes
(
Namespace
),
project
,
project
.
runner_projects
.
new
]
do
|
f
|
=
f
.
hidden_field
:runner_id
,
value:
@runner
.
id
=
f
.
hidden_field
:runner_id
,
value:
@runner
.
id
=
f
.
submit
'Enable'
,
class:
'btn btn-xs'
=
f
.
submit
'Enable'
,
class:
'btn btn-xs'
...
...
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