2021-01-08 18:10:43 +00:00
- add_page_specific_style 'page_bundles/ci_status'
2022-01-06 18:13:45 +00:00
- title = "##{@runner.id} (#{@runner.short_sha})"
- breadcrumb_title title
- page_title title
2021-03-30 12:10:51 +00:00
- add_to_breadcrumbs _('Runners'), admin_runners_path
2021-08-25 09:10:52 +00:00
#js-runner-details{ data: {runner_id: @runner.id} }
2015-08-26 01:42:46 +00:00
.row
.col-md-6
2021-01-07 09:10:22 +00:00
%h4= _('Restrict projects for this runner')
2021-10-12 09:09:35 +00:00
- if @runner.runner_projects.any?
2021-04-07 12:08:53 +00:00
%table.table{ data: { testid: 'assigned-projects' } }
2015-08-26 01:42:46 +00:00
%thead
%tr
2021-01-07 09:10:22 +00:00
%th= _('Assigned projects')
2015-08-26 01:42:46 +00:00
- @runner.runner_projects.each do |runner_project|
- project = runner_project.project
2015-12-04 11:55:23 +00:00
- if project
2020-11-23 15:09:37 +00:00
%tr
2015-10-23 10:41:17 +00:00
%td
2020-11-23 15:09:37 +00:00
.gl-alert.gl-alert-danger
2021-06-16 18:10:35 +00:00
.gl-alert-container
= sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
.gl-alert-content
.gl-alert-body
%strong
= project.full_name
.gl-alert-actions
2021-08-30 12:09:48 +00:00
= link_to _('Disable'), admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'btn gl-alert-action btn-confirm btn-md gl-button'
2015-08-26 01:42:46 +00:00
2021-04-07 12:08:53 +00:00
%table.table{ data: { testid: 'unassigned-projects' } }
2015-08-26 01:42:46 +00:00
%thead
%tr
2021-01-07 09:10:22 +00:00
%th= _('Project')
2015-08-26 01:42:46 +00:00
%th
%tr
%td
2022-01-06 18:13:45 +00:00
= form_tag edit_admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do
2021-04-20 15:09:24 +00:00
.input-group
= search_field_tag :search, params[:search], class: 'form-control gl-form-input', spellcheck: false
.input-group-append
2021-04-20 21:09:07 +00:00
= submit_tag _('Search'), class: 'gl-button btn btn-default'
2015-08-26 01:42:46 +00:00
%td
- @projects.each do |project|
%tr
%td
2018-03-05 13:45:35 +00:00
= project.full_name
2015-08-26 01:42:46 +00:00
%td
2018-04-09 17:42:45 +00:00
.float-right
2020-01-24 12:09:01 +00:00
= form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f|
2015-08-26 01:42:46 +00:00
= f.hidden_field :runner_id, value: @runner.id
2021-08-31 09:08:57 +00:00
= f.submit _('Enable'), class: 'gl-button btn btn-sm', data: { confirm: (s_('Runners|You are about to change this instance runner to a project runner. This operation is not reversible. Are you sure you want to continue?') if @runner.instance_type?) }
2020-01-24 12:09:01 +00:00
= paginate_without_count @projects
2015-08-26 01:42:46 +00:00
.col-md-6
2021-01-07 09:10:22 +00:00
%h4= _('Recent jobs served by this runner')
2016-10-10 21:21:08 +00:00
%table.table.ci-table.runner-builds
2015-08-26 01:42:46 +00:00
%thead
%tr
2021-01-07 09:10:22 +00:00
%th= _('Job')
%th= _('Status')
%th= _('Project')
%th= _('Commit')
%th= _('Finished at')
2015-08-26 01:42:46 +00:00
- @builds.each do |build|
2015-12-04 11:55:23 +00:00
- project = build.project
2015-09-18 23:40:44 +00:00
%tr.build
2015-10-06 18:15:06 +00:00
%td.id
2015-12-04 11:55:23 +00:00
- if project
2017-06-29 17:06:35 +00:00
= link_to project_job_path(project, build) do
2015-12-04 11:55:23 +00:00
%strong ##{build.id}
2015-10-23 10:41:17 +00:00
- else
2015-12-04 11:55:23 +00:00
%strong ##{build.id}
2015-10-06 18:15:06 +00:00
2015-08-26 01:42:46 +00:00
%td.status
2016-12-12 12:28:02 +00:00
= render 'ci/status/badge', status: build.detailed_status(current_user)
2015-08-26 01:42:46 +00:00
%td.status
2015-12-04 11:55:23 +00:00
- if project
2018-03-05 13:45:35 +00:00
= project.full_name
2015-08-26 01:42:46 +00:00
%td.build-link
2015-12-04 11:55:23 +00:00
- if project
2017-11-14 10:06:57 +00:00
= link_to pipeline_path(build.pipeline) do
2017-01-13 16:07:21 +00:00
%strong= build.pipeline.short_sha
2015-08-26 01:42:46 +00:00
%td.timestamp
- if build.finished_at
2018-04-25 15:58:56 +00:00
%span= time_ago_with_tooltip build.finished_at