BigW Consortium Gitlab

_runner.html.haml 1.54 KB
Newer Older
1
%li.runner{ id: dom_id(runner) }
2 3 4
  %h4
    = runner_status_icon(runner)
    %span.monospace
Lin Jen-Shin committed
5
      - if @project_runners.include?(runner)
6
        = link_to runner.short_sha, runner_path(runner)
7
        - if runner.locked?
8
          = icon('lock', class: 'has-tooltip', title: 'Locked to current projects')
9
        %small
10
          = link_to edit_namespace_project_runner_path(@project.namespace, @project, runner) do
11 12 13 14 15
            %i.fa.fa-edit.btn
      - else
        = runner.short_sha

    .pull-right
Lin Jen-Shin committed
16
      - if @project_runners.include?(runner)
17
        - if runner.belongs_to_one_project?
18
          = link_to 'Remove Runner', runner_path(runner), data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
19
        - else
20
          - runner_project = @project.runner_projects.find_by(runner_id: runner)
21
          = 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'
22
      - elsif runner.specific?
23
        = form_for [@project.namespace.becomes(Namespace), @project, @project.runner_projects.new] do |f|
24 25 26 27 28 29 30 31 32 33
          = 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
34
      - runner.tag_list.sort.each do |tag|
35 36
        %span.label.label-primary
          = tag