Allow admins to assign locked runners:
And show information about locked status. Help! This looks bad :o
This commit is contained in:
parent
b5c8d58afb
commit
397a69f834
|
@ -4,8 +4,6 @@ class Admin::RunnerProjectsController < Admin::ApplicationController
|
|||
def create
|
||||
@runner = Ci::Runner.find(params[:runner_project][:runner_id])
|
||||
|
||||
return head(403) if @runner.locked?
|
||||
|
||||
runner_project = @runner.assign_to(@project, current_user)
|
||||
|
||||
if runner_project.persisted?
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
%span.label.label-success shared
|
||||
- else
|
||||
%span.label.label-info specific
|
||||
- if runner.locked?
|
||||
%span.label.label-danger locked
|
||||
- unless runner.active?
|
||||
%span.label.label-danger paused
|
||||
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
%li
|
||||
%span.label.label-info specific
|
||||
\- run builds from assigned projects
|
||||
%li
|
||||
%span.label.label-danger locked
|
||||
\- runner cannot be assigned to other projects
|
||||
%li
|
||||
%span.label.label-danger paused
|
||||
\- runner will not receive any new builds
|
||||
|
|
|
@ -64,6 +64,9 @@
|
|||
= project.name_with_namespace
|
||||
%td
|
||||
.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|
|
||||
= f.hidden_field :runner_id, value: @runner.id
|
||||
= f.submit 'Enable', class: 'btn btn-xs'
|
||||
|
|
Loading…
Reference in New Issue