2021-01-08 18:10:43 +00:00
- add_page_specific_style 'page_bundles/ci_status'
2020-11-19 12:09:26 +00:00
- page_title @runner.short_sha
2021-03-30 12:10:51 +00:00
- add_to_breadcrumbs _('Runners'), admin_runners_path
- breadcrumb_title page_title
2021-04-01 15:08:54 +00:00
- if Feature.enabled?(:runner_detailed_view_vue_ui, current_user, default_enabled: :yaml)
#js-runner-detail{ data: {runner_id: @runner.id} }
- else
%h2.page-title
= sprintf(s_('Runners|Runner #%{runner_id}'), {runner_id: @runner.id})
2018-02-28 17:04:53 +00:00
2018-06-26 09:36:54 +00:00
- if @runner.instance_type?
2015-08-26 01:42:46 +00:00
.bs-callout.bs-callout-success
2021-01-07 09:10:22 +00:00
%h4= _('This runner processes jobs for all unassigned projects.')
2015-08-26 01:42:46 +00:00
%p
2021-01-07 09:10:22 +00:00
= _('If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner.')
2018-05-01 09:11:57 +00:00
- elsif @runner.group_type?
2017-10-05 12:26:36 +00:00
.bs-callout.bs-callout-success
2021-01-07 09:10:22 +00:00
%h4= _('This runner processes jobs for all projects in its group and subgroups.')
2015-08-26 01:42:46 +00:00
- else
.bs-callout.bs-callout-info
2021-01-07 09:10:22 +00:00
%h4= _('This runner processes jobs for assigned projects only.')
%p
= _('You cannot make this a shared runner.')
2015-08-26 01:42:46 +00:00
%hr
2016-05-09 10:47:44 +00:00
2020-08-06 21:10:15 +00:00
.gl-mb-6
2020-04-21 15:21:10 +00:00
= render 'shared/runners/form', runner: @runner, runner_form_url: admin_runner_path(@runner), in_gitlab_com_admin_context: Gitlab.com?
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')
2015-08-26 01:42:46 +00:00
- if @runner.projects.any?
2016-06-17 14:17:20 +00:00
%table.table.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
= sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
.gl-alert-body
%strong
= project.full_name
.gl-alert-actions
= link_to s_('Disable'), admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'btn gl-alert-action btn-info btn-md gl-button'
2015-08-26 01:42:46 +00:00
2016-06-17 14:17:20 +00:00
%table.table.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
2015-12-04 11:55:23 +00:00
= form_tag admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do
2015-08-26 01:42:46 +00:00
.form-group
2015-10-09 16:08:37 +00:00
= search_field_tag :search, params[:search], class: 'form-control', spellcheck: false
2015-08-26 01:42:46 +00:00
= submit_tag 'Search', class: 'btn'
%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
2020-10-13 15:08:53 +00:00
= f.submit 'Enable', class: 'gl-button btn btn-sm'
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