debian-mirror-gitlab/app/views/admin/runners/show.html.haml

102 lines
3.6 KiB
Text
Raw Normal View History

2021-03-08 18:12:59 +05:30
- add_page_specific_style 'page_bundles/ci_status'
2021-06-08 01:23:25 +05:30
- breadcrumb_title @runner.short_sha
- page_title "##{@runner.id} (#{@runner.short_sha})"
2021-04-29 21:17:54 +05:30
- add_to_breadcrumbs _('Runners'), admin_runners_path
2018-05-09 12:01:36 +05:30
2021-04-29 21:17:54 +05:30
- if Feature.enabled?(:runner_detailed_view_vue_ui, current_user, default_enabled: :yaml)
2021-06-08 01:23:25 +05:30
#js-runner-details{ data: {runner_id: @runner.id} }
2015-09-25 12:07:36 +05:30
- else
2021-04-29 21:17:54 +05:30
%h2.page-title
= s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id })
= render 'shared/runners/runner_type_badge', runner: @runner
2021-09-04 01:27:46 +05:30
= render 'shared/runners/runner_type_alert', runner: @runner
.gl-mb-6
= render 'shared/runners/form', runner: @runner, runner_form_url: admin_runner_path(@runner), in_gitlab_com_admin_context: Gitlab.com?
2015-09-25 12:07:36 +05:30
.row
.col-md-6
2021-03-08 18:12:59 +05:30
%h4= _('Restrict projects for this runner')
2015-09-25 12:07:36 +05:30
- if @runner.projects.any?
2021-04-29 21:17:54 +05:30
%table.table{ data: { testid: 'assigned-projects' } }
2015-09-25 12:07:36 +05:30
%thead
%tr
2021-03-08 18:12:59 +05:30
%th= _('Assigned projects')
2015-09-25 12:07:36 +05:30
- @runner.runner_projects.each do |runner_project|
- project = runner_project.project
2015-12-23 02:04:40 +05:30
- if project
2021-02-22 17:27:13 +05:30
%tr
2015-11-26 14:37:03 +05:30
%td
2021-02-22 17:27:13 +05:30
.gl-alert.gl-alert-danger
2021-09-04 01:27:46 +05:30
.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
= link_to s_('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-09-25 12:07:36 +05:30
2021-04-29 21:17:54 +05:30
%table.table{ data: { testid: 'unassigned-projects' } }
2015-09-25 12:07:36 +05:30
%thead
%tr
2021-03-08 18:12:59 +05:30
%th= _('Project')
2015-09-25 12:07:36 +05:30
%th
%tr
%td
2015-12-23 02:04:40 +05:30
= form_tag admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do
2021-06-08 01:23:25 +05:30
.input-group
= search_field_tag :search, params[:search], class: 'form-control gl-form-input', spellcheck: false
.input-group-append
= submit_tag _('Search'), class: 'gl-button btn btn-default'
2015-09-25 12:07:36 +05:30
%td
- @projects.each do |project|
%tr
%td
2018-03-27 19:54:05 +05:30
= project.full_name
2015-09-25 12:07:36 +05:30
%td
2018-11-08 19:23:39 +05:30
.float-right
2020-03-13 15:44:24 +05:30
= form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f|
2015-09-25 12:07:36 +05:30
= f.hidden_field :runner_id, value: @runner.id
2021-06-08 01:23:25 +05:30
= f.submit _('Enable'), class: 'gl-button btn btn-sm'
2020-03-13 15:44:24 +05:30
= paginate_without_count @projects
2015-09-25 12:07:36 +05:30
.col-md-6
2021-03-08 18:12:59 +05:30
%h4= _('Recent jobs served by this runner')
2016-11-03 12:29:30 +05:30
%table.table.ci-table.runner-builds
2015-09-25 12:07:36 +05:30
%thead
%tr
2021-03-08 18:12:59 +05:30
%th= _('Job')
%th= _('Status')
%th= _('Project')
%th= _('Commit')
%th= _('Finished at')
2015-09-25 12:07:36 +05:30
- @builds.each do |build|
2015-12-23 02:04:40 +05:30
- project = build.project
2015-09-25 12:07:36 +05:30
%tr.build
2015-10-24 18:46:33 +05:30
%td.id
2015-12-23 02:04:40 +05:30
- if project
2017-09-10 17:25:29 +05:30
= link_to project_job_path(project, build) do
2015-12-23 02:04:40 +05:30
%strong ##{build.id}
2015-11-26 14:37:03 +05:30
- else
2015-12-23 02:04:40 +05:30
%strong ##{build.id}
2015-10-24 18:46:33 +05:30
2015-09-25 12:07:36 +05:30
%td.status
2017-08-17 22:00:37 +05:30
= render 'ci/status/badge', status: build.detailed_status(current_user)
2015-09-25 12:07:36 +05:30
%td.status
2015-12-23 02:04:40 +05:30
- if project
2018-03-27 19:54:05 +05:30
= project.full_name
2015-09-25 12:07:36 +05:30
%td.build-link
2015-12-23 02:04:40 +05:30
- if project
2018-03-17 18:26:18 +05:30
= link_to pipeline_path(build.pipeline) do
2017-08-17 22:00:37 +05:30
%strong= build.pipeline.short_sha
2015-09-25 12:07:36 +05:30
%td.timestamp
- if build.finished_at
2018-10-15 14:42:47 +05:30
%span= time_ago_with_tooltip build.finished_at