2016-12-26 05:47:16 -05:00
|
|
|
%li.runner{ id: dom_id(runner) }
|
2015-08-25 21:42:46 -04:00
|
|
|
%h4
|
|
|
|
= runner_status_icon(runner)
|
2017-05-11 11:47:44 -04:00
|
|
|
|
|
|
|
- if @project_runners.include?(runner)
|
2018-04-09 21:28:21 -04:00
|
|
|
= link_to runner.short_sha, project_runner_path(@project, runner), class: 'commit-sha'
|
2017-05-11 11:47:44 -04:00
|
|
|
|
|
|
|
- if runner.locked?
|
2018-05-07 09:53:38 -04:00
|
|
|
= icon('lock', class: 'has-tooltip', title: _('Locked to current projects'))
|
2017-05-11 11:47:44 -04:00
|
|
|
|
2017-08-21 10:22:17 -04:00
|
|
|
%small.edit-runner
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to edit_project_runner_path(@project, runner) do
|
2017-05-11 11:47:44 -04:00
|
|
|
%i.fa.fa-edit.btn
|
|
|
|
- else
|
|
|
|
%span.commit-sha
|
2015-08-25 21:42:46 -04:00
|
|
|
= runner.short_sha
|
|
|
|
|
2018-04-09 13:42:45 -04:00
|
|
|
.float-right
|
2016-06-20 04:52:05 -04:00
|
|
|
- if @project_runners.include?(runner)
|
2017-12-19 16:24:36 -05:00
|
|
|
- if runner.active?
|
2018-05-07 09:53:38 -04:00
|
|
|
= link_to _('Pause'), pause_project_runner_path(@project, runner), method: :post, class: 'btn btn-sm btn-danger', data: { confirm: _("Are you sure?") }
|
2017-12-19 16:24:36 -05:00
|
|
|
- else
|
2018-05-07 09:53:38 -04:00
|
|
|
= link_to _('Resume'), resume_project_runner_path(@project, runner), method: :post, class: 'btn btn-success btn-sm'
|
2015-08-25 21:42:46 -04:00
|
|
|
- if runner.belongs_to_one_project?
|
2018-05-07 09:53:38 -04:00
|
|
|
= link_to _('Remove Runner'), project_runner_path(@project, runner), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm'
|
2015-08-25 21:42:46 -04:00
|
|
|
- else
|
2018-08-27 11:31:01 -04:00
|
|
|
- runner_project = @project.runner_projects.find_by(runner_id: runner) # rubocop: disable CodeReuse/ActiveRecord
|
2018-05-07 09:53:38 -04:00
|
|
|
= 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'
|
2018-06-26 05:36:54 -04:00
|
|
|
- elsif runner.project_type?
|
2015-12-14 06:45:03 -05:00
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project, @project.runner_projects.new] do |f|
|
2015-08-25 21:42:46 -04:00
|
|
|
= f.hidden_field :runner_id, value: runner.id
|
2018-05-07 09:53:38 -04:00
|
|
|
= f.submit _('Enable for this project'), class: 'btn btn-sm'
|
2018-04-09 13:42:45 -04:00
|
|
|
.float-right
|
2015-08-25 21:42:46 -04:00
|
|
|
%small.light
|
|
|
|
\##{runner.id}
|
|
|
|
- if runner.description.present?
|
|
|
|
%p.runner-description
|
|
|
|
= runner.description
|
|
|
|
- if runner.tag_list.present?
|
|
|
|
%p
|
2017-02-14 17:28:35 -05:00
|
|
|
- runner.tag_list.sort.each do |tag|
|
2018-04-13 15:35:23 -04:00
|
|
|
%span.badge.badge-primary
|
2015-08-25 21:42:46 -04:00
|
|
|
= tag
|