117 lines
3.9 KiB
Text
117 lines
3.9 KiB
Text
- add_page_specific_style 'page_bundles/ci_status'
|
|
|
|
= content_for :title do
|
|
%h3.project-title
|
|
Runner ##{@runner.id}
|
|
.float-right
|
|
- if @runner.instance_type?
|
|
%span.runner-state.runner-state-shared
|
|
Shared
|
|
- else
|
|
%span.runner-state.runner-state-specific
|
|
Specific
|
|
|
|
- page_title @runner.short_sha
|
|
- add_to_breadcrumbs _("Runners"), admin_runners_path
|
|
- breadcrumb_title "##{@runner.id}"
|
|
|
|
- if @runner.instance_type?
|
|
.bs-callout.bs-callout-success
|
|
%h4= _('This runner processes jobs for all unassigned projects.')
|
|
%p
|
|
= _('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.')
|
|
- elsif @runner.group_type?
|
|
.bs-callout.bs-callout-success
|
|
%h4= _('This runner processes jobs for all projects in its group and subgroups.')
|
|
- else
|
|
.bs-callout.bs-callout-info
|
|
%h4= _('This runner processes jobs for assigned projects only.')
|
|
%p
|
|
= _('You cannot make this a shared runner.')
|
|
%hr
|
|
|
|
.gl-mb-6
|
|
= render 'shared/runners/form', runner: @runner, runner_form_url: admin_runner_path(@runner), in_gitlab_com_admin_context: Gitlab.com?
|
|
|
|
.row
|
|
.col-md-6
|
|
%h4= _('Restrict projects for this runner')
|
|
- if @runner.projects.any?
|
|
%table.table.assigned-projects
|
|
%thead
|
|
%tr
|
|
%th= _('Assigned projects')
|
|
- @runner.runner_projects.each do |runner_project|
|
|
- project = runner_project.project
|
|
- if project
|
|
%tr
|
|
%td
|
|
.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'
|
|
|
|
%table.table.unassigned-projects
|
|
%thead
|
|
%tr
|
|
%th= _('Project')
|
|
%th
|
|
|
|
%tr
|
|
%td
|
|
= form_tag admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do
|
|
.form-group
|
|
= search_field_tag :search, params[:search], class: 'form-control', spellcheck: false
|
|
= submit_tag 'Search', class: 'btn'
|
|
|
|
%td
|
|
- @projects.each do |project|
|
|
%tr
|
|
%td
|
|
= project.full_name
|
|
%td
|
|
.float-right
|
|
= form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f|
|
|
= f.hidden_field :runner_id, value: @runner.id
|
|
= f.submit 'Enable', class: 'gl-button btn btn-sm'
|
|
= paginate_without_count @projects
|
|
|
|
.col-md-6
|
|
%h4= _('Recent jobs served by this runner')
|
|
%table.table.ci-table.runner-builds
|
|
%thead
|
|
%tr
|
|
%th= _('Job')
|
|
%th= _('Status')
|
|
%th= _('Project')
|
|
%th= _('Commit')
|
|
%th= _('Finished at')
|
|
|
|
- @builds.each do |build|
|
|
- project = build.project
|
|
%tr.build
|
|
%td.id
|
|
- if project
|
|
= link_to project_job_path(project, build) do
|
|
%strong ##{build.id}
|
|
- else
|
|
%strong ##{build.id}
|
|
|
|
%td.status
|
|
= render 'ci/status/badge', status: build.detailed_status(current_user)
|
|
|
|
%td.status
|
|
- if project
|
|
= project.full_name
|
|
|
|
%td.build-link
|
|
- if project
|
|
= link_to pipeline_path(build.pipeline) do
|
|
%strong= build.pipeline.short_sha
|
|
|
|
%td.timestamp
|
|
- if build.finished_at
|
|
%span= time_ago_with_tooltip build.finished_at
|