debian-mirror-gitlab/app/views/projects/runners/_runner.html.haml

44 lines
1.8 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
%li.runner{ id: dom_id(runner) }
2015-09-25 12:07:36 +05:30
%h4
= runner_status_icon(runner)
2017-09-10 17:25:29 +05:30
- if @project_runners.include?(runner)
= link_to runner.short_sha, runner_path(runner), class: 'commit-sha'
- if runner.locked?
= icon('lock', class: 'has-tooltip', title: 'Locked to current projects')
2018-03-17 18:26:18 +05:30
%small.edit-runner
2017-09-10 17:25:29 +05:30
= link_to edit_project_runner_path(@project, runner) do
%i.fa.fa-edit.btn
- else
%span.commit-sha
2015-09-25 12:07:36 +05:30
= runner.short_sha
.pull-right
2016-06-22 15:30:34 +05:30
- if @project_runners.include?(runner)
2018-03-17 18:26:18 +05:30
- 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'
2015-09-25 12:07:36 +05:30
- if runner.belongs_to_one_project?
2016-11-03 12:29:30 +05:30
= link_to 'Remove Runner', runner_path(runner), data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
2015-09-25 12:07:36 +05:30
- else
2015-12-23 02:04:40 +05:30
- runner_project = @project.runner_projects.find_by(runner_id: runner)
2017-09-10 17:25:29 +05:30
= 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'
2015-09-25 12:07:36 +05:30
- elsif runner.specific?
2015-12-23 02:04:40 +05:30
= form_for [@project.namespace.becomes(Namespace), @project, @project.runner_projects.new] do |f|
2015-09-25 12:07:36 +05:30
= 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
2017-08-17 22:00:37 +05:30
- runner.tag_list.sort.each do |tag|
2015-09-25 12:07:36 +05:30
%span.label.label-primary
= tag