Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_runner.html.haml « runners « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1a3ba69018468a7f8b0c57f2b9428f77d5c6cd49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
%li.runner{ id: dom_id(runner) }
  %h4
    = runner_status_icon(runner)

    - if @project_runners.include?(runner)
      = link_to _("%{token}...") % { token: runner.short_sha }, project_runner_path(@project, runner), class: 'commit-sha has-tooltip', title: _("Partial token for reference only")

      - if runner.locked?
        %span.has-tooltip{ title: _('Locked to current projects') }
          = sprite_icon('lock')

      %small.edit-runner
        = link_to edit_project_runner_path(@project, runner), class: 'btn btn-edit' do
          = sprite_icon('pencil')
    - else
      %span.commit-sha
        = runner.short_sha

    .float-right
      - if @project_runners.include?(runner)
        - if runner.active?
          = link_to _('Pause'), pause_project_runner_path(@project, runner), method: :post, class: 'btn btn-sm btn-danger', data: { confirm: _("Are you sure?") }
        - else
          = link_to _('Resume'), resume_project_runner_path(@project, runner), method: :post, class: 'btn btn-success btn-sm'
        - if runner.belongs_to_one_project?
          = link_to _('Remove Runner'), project_runner_path(@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) # rubocop: disable CodeReuse/ActiveRecord
          = link_to _('Disable for this project'), project_runner_project_path(@project, runner_project), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm'
      - elsif runner.project_type?
        = form_for [@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'
  .float-right
    %small.light
      \##{runner.id}
  - if runner.description.present?
    %p.runner-description
      = runner.description
  - if runner.tags.present?
    %p
      - runner.tags.map(&:name).sort.each do |tag|
        %span.badge.badge-primary
          = tag