2023-07-09 08:55:56 +05:30
|
|
|
- runner_name = runner_short_name(@runner)
|
2022-07-16 23:28:13 +05:30
|
|
|
- breadcrumb_title _('Edit')
|
|
|
|
- page_title _('Edit'), runner_name
|
|
|
|
- add_to_breadcrumbs _('Runners'), admin_runners_path
|
|
|
|
- add_to_breadcrumbs runner_name, admin_runner_path(@runner)
|
2022-03-02 08:16:31 +05:30
|
|
|
|
2022-07-16 23:28:13 +05:30
|
|
|
#js-admin-runner-edit{ data: {runner_id: @runner.id, runner_path: admin_runner_path(@runner) } }
|
2022-03-02 08:16:31 +05:30
|
|
|
|
2022-07-16 23:28:13 +05:30
|
|
|
- if @runner.project_type?
|
|
|
|
.gl-overflow-auto
|
|
|
|
%h4.gl-font-lg.gl-my-5= _('Restrict projects for this runner')
|
2022-03-02 08:16:31 +05:30
|
|
|
|
2022-07-16 23:28:13 +05:30
|
|
|
- if @runner.runner_projects.any?
|
|
|
|
%table.table{ data: { testid: 'assigned-projects' } }
|
2022-03-02 08:16:31 +05:30
|
|
|
%thead
|
|
|
|
%tr
|
2022-07-16 23:28:13 +05:30
|
|
|
%th= _('Assigned projects')
|
|
|
|
- @runner.runner_projects.each do |runner_project|
|
|
|
|
- project = runner_project.project
|
|
|
|
- if project
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= render Pajamas::AlertComponent.new(variant: :danger,
|
|
|
|
dismissible: false,
|
|
|
|
title: project.full_name) do |c|
|
2023-07-09 08:55:56 +05:30
|
|
|
- c.with_actions do
|
2023-03-17 16:20:25 +05:30
|
|
|
= render Pajamas::ButtonComponent.new(variant: :confirm, href: admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete) do
|
|
|
|
= _('Disable')
|
2022-07-16 23:28:13 +05:30
|
|
|
|
|
|
|
%table.table{ data: { testid: 'unassigned-projects' } }
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th= s_('Runners|Select projects to assign to this runner')
|
|
|
|
%th
|
|
|
|
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
= form_tag edit_admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do
|
|
|
|
.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'
|
|
|
|
|
|
|
|
%td
|
|
|
|
- @projects.each do |project|
|
2022-03-02 08:16:31 +05:30
|
|
|
%tr
|
|
|
|
%td
|
2022-07-16 23:28:13 +05:30
|
|
|
= project.full_name
|
2022-03-02 08:16:31 +05:30
|
|
|
%td
|
2022-07-16 23:28:13 +05:30
|
|
|
.float-right
|
2023-03-17 16:20:25 +05:30
|
|
|
= gitlab_ui_form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f|
|
2022-07-16 23:28:13 +05:30
|
|
|
= f.hidden_field :runner_id, value: @runner.id
|
2023-03-17 16:20:25 +05:30
|
|
|
= render Pajamas::ButtonComponent.new(size: :small, type: :submit) do
|
|
|
|
= _('Enable')
|
2022-07-16 23:28:13 +05:30
|
|
|
= paginate_without_count @projects
|