BigW Consortium Gitlab

show.html.haml 3.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
= 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
Filipa Lacerda committed
14
    %h4 This Runner will process jobs from ALL UNASSIGNED projects
15
    %p
16
      If you want Runners to build only specific projects, enable them in the table below.
17 18 19
      Keep in mind that this is a one way transition.
- else
  .bs-callout.bs-callout-info
Filipa Lacerda committed
20
    %h4 This Runner will process jobs only from ASSIGNED projects
21
    %p You can't make this a shared Runner.
22
%hr
23 24 25

.append-bottom-20
  = render '/projects/runners/form', runner: @runner, runner_form_url: admin_runner_path(@runner)
26 27 28

.row
  .col-md-6
29
    %h4 Restrict projects for this Runner
30
    - if @runner.projects.any?
31
      %table.table.assigned-projects
32 33 34 35 36 37
        %thead
          %tr
            %th Assigned projects
            %th
        - @runner.runner_projects.each do |runner_project|
          - project = runner_project.project
38
          - if project
39 40 41
            %tr.alert-info
              %td
                %strong
42
                  = project.name_with_namespace
43 44
              %td
                .pull-right
45
                  = link_to 'Disable', [:admin, project.namespace.becomes(Namespace), project, runner_project], method: :delete, class: 'btn btn-danger btn-xs'
46

47
    %table.table.unassigned-projects
48 49 50 51 52 53 54
      %thead
        %tr
          %th Project
          %th

      %tr
        %td
55
          = form_tag admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do
56
            .form-group
57
              = search_field_tag :search, params[:search], class: 'form-control', spellcheck: false
58 59 60 61 62 63
            = submit_tag 'Search', class: 'btn'

        %td
      - @projects.each do |project|
        %tr
          %td
64
            = project.name_with_namespace
65 66
          %td
            .pull-right
67
              = form_for [:admin, project.namespace.becomes(Namespace), project, project.runner_projects.new] do |f|
68 69
                = f.hidden_field :runner_id, value: @runner.id
                = f.submit 'Enable', class: 'btn btn-xs'
70
    = paginate @projects, theme: "gitlab"
71 72

  .col-md-6
Filipa Lacerda committed
73
    %h4 Recent jobs served by this Runner
74
    %table.table.ci-table.runner-builds
75 76
      %thead
        %tr
Filipa Lacerda committed
77
          %th Job
78 79 80 81 82 83
          %th Status
          %th Project
          %th Commit
          %th Finished at

      - @builds.each do |build|
84
        - project = build.project
85
        %tr.build
86
          %td.id
87
            - if project
88
              = link_to project_job_path(project, build) do
89
                %strong ##{build.id}
90
            - else
91
              %strong ##{build.id}
92

93
          %td.status
94
            = render 'ci/status/badge', status: build.detailed_status(current_user)
95 96

          %td.status
97 98
            - if project
              = project.name_with_namespace
99 100

          %td.build-link
101
            - if project
102
              = link_to pipeline_path(build.pipeline) do
103
                %strong= build.pipeline.short_sha
104 105 106 107

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