_runner.html.haml 1.8 KB
Newer Older
1
%tr{ id: dom_id(runner) }
D
Douwe Maan 已提交
2 3
  %td
    - if runner.shared?
4
      %span.badge.badge-success shared
D
Douwe Maan 已提交
5
    - else
C
Clement Ho 已提交
6
      %span.badge.badge-info specific
7
    - if runner.locked?
8
      %span.badge.badge-warning locked
D
Douwe Maan 已提交
9
    - unless runner.active?
10
      %span.badge.badge-danger paused
D
Douwe Maan 已提交
11 12

  %td
K
Kamil Trzcinski 已提交
13
    = link_to admin_runner_path(runner) do
D
Douwe Maan 已提交
14 15
      = runner.short_sha
  %td
16
    = runner.description
17 18
  %td
    = runner.version
19 20
  %td
    = runner.ip_address
D
Douwe Maan 已提交
21 22
  %td
    - if runner.shared?
23
      n/a
D
Douwe Maan 已提交
24 25 26 27 28
    - else
      = runner.projects.count(:all)
  %td
    #{runner.builds.count(:all)}
  %td
29
    - runner.tag_list.sort.each do |tag|
30
      %span.badge.badge-primary
D
Douwe Maan 已提交
31 32 33 34 35 36
        = tag
  %td
    - if runner.contacted_at
      #{time_ago_in_words(runner.contacted_at)} ago
    - else
      Never
37
  %td.admin-runner-btn-group-cell
38
    .float-right.btn-group
39
      = link_to admin_runner_path(runner), class: 'btn btn-sm btn-secondary has-tooltip', title: 'Edit', ref: 'tooltip', aria: { label: 'Edit' }, data: { placement: 'top', container: 'body'} do
40
        = icon('pencil')
D
Douwe Maan 已提交
41 42
       
      - if runner.active?
43
        = link_to [:pause, :admin, runner], method: :get, class: 'btn btn-sm btn-secondary has-tooltip', title: 'Pause', ref: 'tooltip', aria: { label: 'Pause' }, data: { placement: 'top', container: 'body', confirm: "Are you sure?" } do
44
          = icon('pause')
D
Douwe Maan 已提交
45
      - else
46
        = link_to [:resume, :admin, runner], method: :get, class: 'btn btn-secondary btn-sm has-tooltip', title: 'Resume', ref: 'tooltip', aria: { label: 'Resume' }, data: { placement: 'top', container: 'body'} do
47 48 49
          = icon('play')
      = link_to [:admin, runner], method: :delete, class: 'btn btn-danger btn-sm has-tooltip', title: 'Remove', ref: 'tooltip', aria: { label: 'Remove' }, data: { placement: 'top', container: 'body', confirm: "Are you sure?" } do
        = icon('remove')