summaryrefslogtreecommitdiff
path: root/app/views/ci/runners/_runner.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/ci/runners/_runner.html.haml')
-rw-r--r--app/views/ci/runners/_runner.html.haml35
1 files changed, 35 insertions, 0 deletions
diff --git a/app/views/ci/runners/_runner.html.haml b/app/views/ci/runners/_runner.html.haml
new file mode 100644
index 00000000000..ef8622e2807
--- /dev/null
+++ b/app/views/ci/runners/_runner.html.haml
@@ -0,0 +1,35 @@
+%li.runner{id: dom_id(runner)}
+ %h4
+ = runner_status_icon(runner)
+ %span.monospace
+ - if @runners.include?(runner)
+ = link_to runner.short_sha, ci_project_runner_path(@project, runner)
+ %small
+ =link_to edit_ci_project_runner_path(@project, runner) do
+ %i.fa.fa-edit.btn
+ - else
+ = runner.short_sha
+
+ .pull-right
+ - if @runners.include?(runner)
+ - if runner.belongs_to_one_project?
+ = link_to 'Remove runner', [:ci, @project, runner], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
+ - else
+ - runner_project = @project.runner_projects.find_by(runner_id: runner)
+ = link_to 'Disable for this project', [:ci, @project, runner_project], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
+ - elsif runner.specific?
+ = form_for [:ci, @project, @project.runner_projects.new] do |f|
+ = f.hidden_field :runner_id, value: runner.id
+ = f.submit 'Enable for this project', class: 'btn btn-sm'
+ .pull-right
+ %small.light
+ \##{runner.id}
+ - if runner.description.present?
+ %p.runner-description
+ = runner.description
+ - if runner.tag_list.present?
+ %p
+ - runner.tag_list.each do |tag|
+ %span.label.label-primary
+ = tag
+