_runner.html.haml 3.31 KB
Newer Older
1
.gl-responsive-table-row{ id: dom_id(runner) }
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
  .table-section.section-10.section-wrap
    .table-mobile-header{ role: 'rowheader' }= _('Type')
    .table-mobile-content
      - if runner.instance_type?
        %span.badge.badge-success shared
      - elsif runner.group_type?
        %span.badge.badge-success group
      - else
        %span.badge.badge-info specific
      - if runner.locked?
        %span.badge.badge-warning locked
      - unless runner.active?
        %span.badge.badge-danger paused

  .table-section.section-10
    .table-mobile-header{ role: 'rowheader' }= _('Runner token')
    .table-mobile-content
      = link_to runner.short_sha, admin_runner_path(runner)

21
  .table-section.section-20
22 23 24 25
    .table-mobile-header{ role: 'rowheader' }= _('Description')
    .table-mobile-content.str-truncated.has-tooltip{ title: runner.description }
      = runner.description

26
  .table-section.section-10
27 28 29 30 31 32
    .table-mobile-header{ role: 'rowheader' }= _('Version')
    .table-mobile-content.str-truncated.has-tooltip{ title: runner.version }
      = runner.version

  .table-section.section-10
    .table-mobile-header{ role: 'rowheader' }= _('IP Address')
33
    .table-mobile-content.str-truncated.has-tooltip{ title: runner.ip_address }
34 35 36 37 38 39 40 41 42 43 44 45 46
      = runner.ip_address

  .table-section.section-5
    .table-mobile-header{ role: 'rowheader' }= _('Projects')
    .table-mobile-content
      - if runner.instance_type? || runner.group_type?
        = _('n/a')
      - else
        = runner.projects.count(:all)

  .table-section.section-5
    .table-mobile-header{ role: 'rowheader' }= _('Jobs')
    .table-mobile-content
47
      = limited_counter_with_delimiter(runner.builds)
48 49 50 51

  .table-section.section-10.section-wrap
    .table-mobile-header{ role: 'rowheader' }= _('Tags')
    .table-mobile-content
52
      - runner.tags.map(&:name).sort.each do |tag|
53
        %span.badge.badge-primary.str-truncated.has-tooltip{ title: tag }
54 55 56 57 58
          = tag

  .table-section.section-10
    .table-mobile-header{ role: 'rowheader' }= _('Last contact')
    .table-mobile-content
59 60 61
      - contacted_at = runner_contacted_at(runner)
      - if contacted_at
        = time_ago_with_tooltip contacted_at
62 63
      - else
        = _('Never')
64 65 66 67

  .table-section.table-button-footer.section-10
    .btn-group.table-action-buttons
      .btn-group
68
        = link_to admin_runner_path(runner), class: 'btn btn-default has-tooltip', title: _('Edit'), ref: 'tooltip', aria: { label: _('Edit') }, data: { placement: 'top', container: 'body'} do
69 70 71
          = icon('pencil')
      .btn-group
        - if runner.active?
72
          = link_to [:pause, :admin, runner], method: :get, class: 'btn btn-default has-tooltip', title: _('Pause'), ref: 'tooltip', aria: { label: _('Pause') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do
73 74
            = icon('pause')
        - else
75
          = link_to [:resume, :admin, runner], method: :get, class: 'btn btn-default has-tooltip', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do
76 77
            = icon('play')
      .btn-group
78
        = link_to [:admin, runner], method: :delete, class: 'btn btn-danger has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do
79
          = icon('remove')