_info.html.haml 2.34 KB
Newer Older
1 2
.page-content-header
  .header-main-content
3
    = render 'ci/status/badge_link', status: @pipeline.detailed_status(current_user)
4 5 6 7
    %strong Pipeline ##{@commit.pipelines.last.id}
    triggered #{time_ago_with_tooltip(@commit.authored_date)} by
    = author_avatar(@commit, size: 24)
    = commit_author_link(@commit)
8
  .header-action-buttons
9 10
    - if can?(current_user, :update_pipeline, @pipeline.project)
      - if @pipeline.builds.latest.failed.any?(&:retryable?)
11
        = link_to "Retry failed", retry_namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'btn btn-inverted-secondary', method: :post
12
      - if @pipeline.builds.running_or_pending.any?
13
        = link_to "Cancel running", cancel_namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
Kamil Trzcinski's avatar
Kamil Trzcinski committed
14 15

- if @commit
16
  .commit-box
Kamil Trzcinski's avatar
Kamil Trzcinski committed
17
    %h3.commit-title
18
      = markdown(@commit.title, pipeline: :single_line)
Kamil Trzcinski's avatar
Kamil Trzcinski committed
19 20
    - if @commit.description.present?
      %pre.commit-description
21
        = preserve(markdown(@commit.description, pipeline: :single_line))
22 23 24 25

.info-well
  - if @commit.status
    .well-segment.pipeline-info
26
      %div{ class: "icon-container ci-status-icon-#{@commit.status}" }
27 28 29
        = ci_icon_for_status(@commit.status)
      = pluralize @pipeline.statuses.count(:id), "build"
      - if @pipeline.ref
30
        from
31 32 33 34 35 36 37 38 39 40
        = link_to @pipeline.ref, namespace_project_commits_path(@project.namespace, @project, @pipeline.ref), class: "monospace"
      - if @pipeline.duration
        in
        = time_interval_in_words(@pipeline.duration)
      - if @pipeline.queued_duration
        = "(queued for #{time_interval_in_words(@pipeline.queued_duration)})"

  .well-segment.branch-info
    .icon-container.commit-icon
      = custom_icon("icon_commit")
41 42 43 44 45 46 47
    = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @pipeline.sha), class: "monospace js-details-short"
    = link_to("#", class: "js-details-expand hidden-xs hidden-sm") do
      %span.text-expander
        \...
    %span.js-details-content.hide
      = link_to @pipeline.sha, namespace_project_commit_path(@project.namespace, @project, @pipeline.sha), class: "monospace commit-hash-full"
    = clipboard_button(clipboard_text: @pipeline.sha, title: "Copy commit SHA to clipboard")