Read about our upcoming Code of Conduct on this issue

_runner.html.haml 1.39 KB
Newer Older
Douwe Maan's avatar
Douwe Maan committed
1
2
3
4
5
%li.runner{id: dom_id(runner)}
  %h4
    = runner_status_icon(runner)
    %span.monospace
      - if @runners.include?(runner)
6
        = link_to runner.short_sha, runner_path(runner)
Douwe Maan's avatar
Douwe Maan committed
7
        %small
8
          =link_to edit_namespace_project_runner_path(@project.namespace, @project, runner) do
Douwe Maan's avatar
Douwe Maan committed
9
10
11
12
13
14
15
            %i.fa.fa-edit.btn
      - else
        = runner.short_sha

    .pull-right
      - if @runners.include?(runner)
        - if runner.belongs_to_one_project?
16
          = link_to 'Remove runner', runner_path(runner), data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
Douwe Maan's avatar
Douwe Maan committed
17
        - else
18
          - runner_project = @project.runner_projects.find_by(runner_id: runner)
19
          = link_to 'Disable for this project', namespace_project_runner_project_path(@project.namespace, @project, runner_project), data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
Douwe Maan's avatar
Douwe Maan committed
20
      - elsif runner.specific?
21
        = form_for [@project.namespace, @project, @project.runner_projects.new] do |f|
Douwe Maan's avatar
Douwe Maan committed
22
23
24
25
26
27
28
29
30
31
32
33
34
          = 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