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

4
.top-area
5
  %ul.nav-links
K
Kamil Trzcinski 已提交
6 7
    %li{class: ('active' if @scope.nil?)}
      = link_to project_builds_path(@project) do
8 9 10 11 12 13
        All
        %span.badge.js-totalbuilds-count
          = number_with_delimiter(@all_builds.count(:id))

    %li{class: ('active' if @scope == 'running')}
      = link_to project_builds_path(@project, scope: :running) do
K
Kamil Trzcinski 已提交
14
        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
  .nav-controls
25
    - if can?(current_user, :update_build, @project)
26 27 28 29 30 31 32 33
      - if @all_builds.running_or_pending.any?
        = link_to 'Cancel running', cancel_all_namespace_project_builds_path(@project.namespace, @project),
          data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post

      = link_to ci_lint_path, class: 'btn btn-default' do
        = icon('wrench')
        %span CI Lint

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

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

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

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