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 @ci_project && current_user && 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?
K
Kamil Trzcinski 已提交
9
          = link_to 'Cancel all', 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
K
Kamil Trzcinski 已提交
15
        %span.badge.js-running-count= @all_builds.running_or_pending.count(:id)
K
Kamil Trzcinski 已提交
16 17 18 19

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

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

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

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

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

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