_build.html.haml 1.3 KB
Newer Older
D
Dmitriy Zaporozhets 已提交
1
%tr.build
D
Douwe Maan 已提交
2
  %td.status
D
Dmitriy Zaporozhets 已提交
3
    = ci_status_with_icon(build.status)
D
Douwe Maan 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

  %td.build-link
    = link_to ci_project_build_path(build.project, build) do
      %strong Build ##{build.id}

  %td
    = build.stage

  %td
    = build.name
    .pull-right
      - if build.tags.any?
        - build.tag_list.each do |tag|
          %span.label.label-primary
            = tag
      - if build.trigger_request
        %span.label.label-info triggered
      - if build.allow_failure
        %span.label.label-danger allowed to fail

  %td.duration
    - if build.duration
      #{duration_in_words(build.finished_at, build.started_at)}

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

  - if build.project.coverage_enabled?
    %td.coverage
      - if build.coverage
        #{build.coverage}%

  %td
V
Valery Sizov 已提交
38
    - if defined?(controls) && current_user && can?(current_user, :manage_builds, gl_project)
D
Douwe Maan 已提交
39 40 41
      .pull-right
        - if build.active?
          = link_to cancel_ci_project_build_path(build.project, build, return_to: request.original_url), title: 'Cancel build' do
42
            %i.fa.fa-remove.cred
D
Douwe Maan 已提交
43 44
        - elsif build.commands.present?
          = link_to retry_ci_project_build_path(build.project, build, return_to: request.original_url), method: :post, title: 'Retry build' do
45
            %i.fa.fa-repeat