summaryrefslogtreecommitdiff
path: root/app/views/projects/pipelines/_info.html.haml
blob: 673c3370b62c6c03e7fee2b865087a4cb300f465 (plain)
1
2
3
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
#js-pipeline-header-vue.pipeline-header-container

- if @commit
  .commit-box
    %h3.commit-title
      = markdown(@commit.title, pipeline: :single_line)
    - if @commit.description.present?
      %pre.commit-description
        = preserve(markdown(@commit.description, pipeline: :single_line))

.info-well
  - if @commit.status
    .well-segment.pipeline-info
      .icon-container
        = icon('clock-o')
      = pluralize @pipeline.statuses.count(:id), "job"
      - if @pipeline.ref
        from
        = link_to @pipeline.ref, project_ref_path(@project, @pipeline.ref), class: "ref-name"
      - 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")
    = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @pipeline.sha), class: "commit-sha 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: "commit-sha commit-hash-full"
    = clipboard_button(text: @pipeline.sha, title: "Copy commit SHA to clipboard")