Read about our upcoming Code of Conduct on this issue

show.html.haml 3.72 KB
Newer Older
Douwe Maan's avatar
Douwe Maan committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
= content_for :title do
  %h3.project-title
    Runner ##{@runner.id}
    .pull-right
      - if @runner.shared?
        %span.runner-state.runner-state-shared
          Shared
      - else
        %span.runner-state.runner-state-specific
          Specific



- if @runner.shared?
  .bs-callout.bs-callout-success
16
    %h4 This runner will process builds from ALL UNASSIGNED projects
Douwe Maan's avatar
Douwe Maan committed
17
18
19
20
21
    %p
      If you want runners to build only specific projects, enable them in the table below.
      Keep in mind that this is a one way transition.
- else
  .bs-callout.bs-callout-info
22
    %h4 This runner will process builds only from ASSIGNED projects
Douwe Maan's avatar
Douwe Maan committed
23
24
    %p You can't make this a shared runner.
%hr
25
= form_for @runner, url: admin_runner_path(@runner), html: { class: 'form-horizontal' } do |f|
Douwe Maan's avatar
Douwe Maan committed
26
27
28
29
30
31
32
33
34
35
36
37
38
39
  .form-group
    = label_tag :token, class: 'control-label' do
      Token
    .col-sm-10
      = f.text_field :token, class: 'form-control', readonly: true
  .form-group
    = label_tag :description, class: 'control-label' do
      Description
    .col-sm-10
      = f.text_field :description, class: 'form-control'
  .form-group
    = label_tag :tag_list, class: 'control-label' do
      Tags
    .col-sm-10
Valery Sizov's avatar
Valery Sizov committed
40
      = f.text_field :tag_list, value: @runner.tag_list.to_s, class: 'form-control'
Douwe Maan's avatar
Douwe Maan committed
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
      .help-block You can setup builds to only use runners with specific tags
  .form-actions
    = f.submit 'Save', class: 'btn btn-save'

.row
  .col-md-6
    %h4 Restrict projects for this runner
    - if @runner.projects.any?
      %table.table
        %thead
          %tr
            %th Assigned projects
            %th
        - @runner.runner_projects.each do |runner_project|
          - project = runner_project.project
56
          - if project
57
58
59
            %tr.alert-info
              %td
                %strong
60
                  = project.name_with_namespace
61
62
              %td
                .pull-right
63
                  = link_to 'Disable', [:admin, project.namespace, project, runner_project], method: :delete, class: 'btn btn-danger btn-xs'
Douwe Maan's avatar
Douwe Maan committed
64
65
66
67
68
69
70
71
72

    %table.table
      %thead
        %tr
          %th Project
          %th

      %tr
        %td
73
          = form_tag admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do
Douwe Maan's avatar
Douwe Maan committed
74
            .form-group
75
              = search_field_tag :search, params[:search], class: 'form-control', spellcheck: false
Douwe Maan's avatar
Douwe Maan committed
76
77
78
79
80
81
            = submit_tag 'Search', class: 'btn'

        %td
      - @projects.each do |project|
        %tr
          %td
82
            = project.name_with_namespace
Douwe Maan's avatar
Douwe Maan committed
83
84
          %td
            .pull-right
85
              = form_for [:admin, project.namespace, project, project.runner_projects.new] do |f|
Douwe Maan's avatar
Douwe Maan committed
86
87
88
89
90
91
                = f.hidden_field :runner_id, value: @runner.id
                = f.submit 'Enable', class: 'btn btn-xs'
    = paginate @projects

  .col-md-6
    %h4 Recent builds served by this runner
92
    %table.table.builds.runner-builds
Douwe Maan's avatar
Douwe Maan committed
93
94
      %thead
        %tr
95
          %th Build
Douwe Maan's avatar
Douwe Maan committed
96
97
98
99
100
101
          %th Status
          %th Project
          %th Commit
          %th Finished at

      - @builds.each do |build|
102
        - project = build.project
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
103
        %tr.build
104
          %td.id
105
106
107
            - if project
              = link_to namespace_project_build_path(project.namespace, project, build) do
                %strong ##{build.id}
108
            - else
109
              %strong ##{build.id}
110

Douwe Maan's avatar
Douwe Maan committed
111
          %td.status
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
112
            = ci_status_with_icon(build.status)
Douwe Maan's avatar
Douwe Maan committed
113
114

          %td.status
115
116
            - if project
              = project.name_with_namespace
Douwe Maan's avatar
Douwe Maan committed
117
118

          %td.build-link
119
            - if project
120
121
              = link_to ci_status_path(build.commit) do
                %strong #{build.commit.short_sha}
Douwe Maan's avatar
Douwe Maan committed
122
123
124
125

          %td.timestamp
            - if build.finished_at
              %span #{time_ago_in_words build.finished_at} ago