index.html.haml 1.7 KB
Newer Older
K
Kamil Trzcinski 已提交
1
- page_title "Builds"
K
Kamil Trzcinski 已提交
2
= render "header_title"
K
Kamil Trzcinski 已提交
3

K
Kamil Trzcinski 已提交
4 5
.project-issuable-filter
  .controls
K
Kamil Trzcinski 已提交
6
    - if can?(current_user, :manage_builds, @project)
K
Kamil Trzcinski 已提交
7
      .pull-left.hidden-xs
K
Kamil Trzcinski 已提交
8
        - if @all_builds.running_or_pending.any?
9
          = link_to 'Cancel running', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
K
Kamil Trzcinski 已提交
10

K
Kamil Trzcinski 已提交
11 12 13 14
  %ul.center-top-menu
    %li{class: ('active' if @scope.nil?)}
      = link_to project_builds_path(@project) do
        Running
15 16
        %span.badge.js-running-count
          = number_with_delimiter(@all_builds.running_or_pending.count(:id))
K
Kamil Trzcinski 已提交
17 18 19 20

    %li{class: ('active' if @scope == 'finished')}
      = link_to project_builds_path(@project, scope: :finished) do
        Finished
21 22
        %span.badge.js-running-count
          = number_with_delimiter(@all_builds.finished.count(:id))
K
Kamil Trzcinski 已提交
23 24 25 26

    %li{class: ('active' if @scope == 'all')}
      = link_to project_builds_path(@project, scope: :all) do
        All
27 28
        %span.badge.js-totalbuilds-count
          = number_with_delimiter(@all_builds.count(:id))
K
Kamil Trzcinski 已提交
29 30

.gray-content-block
K
Kamil Trzcinski 已提交
31
  #{(@scope || 'running').capitalize} builds from this project
K
Kamil Trzcinski 已提交
32

K
Kamil Trzcinski 已提交
33 34 35 36 37
%ul.content-list
  - if @builds.blank?
    %li
      .nothing-here-block No builds to show
  - else
D
Douwe Maan 已提交
38 39 40 41 42
    .table-holder
      %table.table.builds
        %thead
          %tr
            %th Status
K
Kamil Trzcinski 已提交
43
            %th Runner
D
Douwe Maan 已提交
44 45
            %th Commit
            %th Ref
K
Kamil Trzcinski 已提交
46
            %th Stage
D
Douwe Maan 已提交
47 48 49 50 51 52
            %th Name
            %th Duration
            %th Finished at
            %th

        - @builds.each do |build|
K
Kamil Trzcinski 已提交
53
          = render 'projects/commit_statuses/commit_status', commit_status: build, commit_sha: true, stage: true, allow_retry: true
K
Kamil Trzcinski 已提交
54

K
Kamil Trzcinski 已提交
55
    = paginate @builds, theme: 'gitlab'