show.html.haml 2.2 KB
Newer Older
D
Douwe Maan 已提交
1
.commit-info
D
Dmitriy Zaporozhets 已提交
2 3
  .append-bottom-20
    = ci_status_with_icon(@commit.status)
D
Douwe Maan 已提交
4

D
Dmitriy Zaporozhets 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  .gray-content-block.middle-block
    %pre.commit-message
      #{@commit.git_commit_message}

  .gray-content-block.second-block
    .row
      .col-sm-6
        - if @commit.compare?
          %p
            %span.attr-name Compare:
            #{gitlab_compare_link(@project, @commit.short_before_sha, @commit.short_sha)}
        - else
          %p
            %span.attr-name Commit:
            #{gitlab_commit_link(@project, @commit.sha)}
D
Douwe Maan 已提交
20 21

        %p
D
Dmitriy Zaporozhets 已提交
22 23 24 25 26 27 28 29 30 31
          %span.attr-name Branch:
          #{gitlab_ref_link(@project, @commit.ref)}
      .col-sm-6
        %p
          %span.attr-name Author:
          #{@commit.git_author_name} (#{@commit.git_author_email})
        - if @commit.created_at
          %p
            %span.attr-name Created at:
            #{@commit.created_at.to_s(:short)}
D
Douwe Maan 已提交
32

V
Valery Sizov 已提交
33
- if current_user && can?(current_user, :manage_builds, gl_project)
D
Douwe Maan 已提交
34 35
  .pull-right
    - if @commit.builds.running_or_pending.any?
V
Valery Sizov 已提交
36
      = link_to "Cancel", cancel_ci_project_ref_commits_path(@project, @commit.ref, @commit.sha), class: 'btn btn-sm btn-danger'
D
Douwe Maan 已提交
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53


- if @commit.yaml_errors.present?
  .bs-callout.bs-callout-danger
    %h4 Found errors in your .gitlab-ci.yml:
    %ul
      - @commit.yaml_errors.split(",").each do |error|
        %li= error

- unless @commit.push_data[:ci_yaml_file]
  .bs-callout.bs-callout-warning
    \.gitlab-ci.yml not found in this commit

%h3
  Builds
  - if @commit.duration > 0
    %small.pull-right
54
      %i.fa.fa-time
D
Douwe Maan 已提交
55 56
      #{time_interval_in_words @commit.duration}

57
%table.table.builds
D
Douwe Maan 已提交
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
  %thead
    %tr
      %th Status
      %th Build ID
      %th Stage
      %th Name
      %th Duration
      %th Finished at
      - if @project.coverage_enabled?
        %th Coverage
      %th
  = render @commit.builds_without_retry_sorted, controls: true

- if @commit.retried_builds.any?
  %h3
    Retried builds

75
  %table.table.builds
D
Douwe Maan 已提交
76 77 78 79 80 81 82 83 84 85 86 87
    %thead
      %tr
        %th Status
        %th Build ID
        %th Stage
        %th Name
        %th Duration
        %th Finished at
        - if @project.coverage_enabled?
          %th Coverage
        %th
    = render @commit.retried_builds