BigW Consortium Gitlab

Commit 397a69f8 by Lin Jen-Shin

Allow admins to assign locked runners:

And show information about locked status. Help! This looks bad :o
parent b5c8d58a
......@@ -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
......
......@@ -40,6 +40,9 @@
%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'
......
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