Welcome to mirror list, hosted at ThFree Co, Russian Federation.

edit.html.haml « runners « admin « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3d24572227091dae084f18fc00641f3729582d3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- runner_name = runner_short_name(@runner)
- breadcrumb_title _('Edit')
- page_title _('Edit'), runner_name
- add_to_breadcrumbs _('Runners'), admin_runners_path
- add_to_breadcrumbs runner_name, admin_runner_path(@runner)

#js-admin-runner-edit{ data: {runner_id: @runner.id, runner_path: admin_runner_path(@runner) } }

- if @runner.project_type?
  .gl-overflow-auto
    %h4.gl-font-lg.gl-my-5= _('Restrict projects for this runner')

  - if @runner.runner_projects.any?
    %table.table{ data: { testid: 'assigned-projects' } }
      %thead
        %tr
          %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|
                - c.with_actions do
                  = render Pajamas::ButtonComponent.new(variant: :confirm, href: admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete) do
                    = _('Disable')

  %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|
      %tr
        %td
          = project.full_name
        %td
          .float-right
            = gitlab_ui_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
              = render Pajamas::ButtonComponent.new(size: :small, type: :submit) do
                = _('Enable')
  = paginate_without_count @projects