summaryrefslogtreecommitdiff
path: root/app/views/projects/pipelines/_info.html.haml
blob: 5d307d6a70df9edc3517be201b9219b83bd4bd56 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.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
  .well-segment.pipeline-info
    .icon-container
      = icon('clock-o')
    = pluralize @pipeline.total_size, "job"
    = @pipeline.ref_text
    - 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.qa-pipeline-badges
    .icon-container
      = sprite_icon('flag')
    - if @pipeline.latest?
      %span.js-pipeline-url-latest.badge.badge-success.has-tooltip{ title: _("Latest pipeline for this branch") }
        latest
    - if @pipeline.has_yaml_errors?
      %span.js-pipeline-url-yaml.badge.badge-danger.has-tooltip{ title: @pipeline.yaml_errors }
        yaml invalid
    - if @pipeline.failure_reason?
      %span.js-pipeline-url-failure.badge.badge-danger.has-tooltip{ title: @pipeline.failure_reason }
        error
    - if @pipeline.auto_devops_source?
      - popover_title_text = _('This pipeline makes use of a predefined CI/CD configuration enabled by <b>Auto DevOps.</b>').html_safe
      - popover_content_url = help_page_path('topics/autodevops/index.md')
      - popover_content_text = _('Learn more about Auto DevOps')
      %a.js-pipeline-url-autodevops.badge.badge-info.autodevops-badge{ href: "#", tabindex: "0", role: "button", data: { container: "body",
        toggle: "popover",
        placement: "top",
        html: "true",
        trigger: "focus",
        title: "<div class='autodevops-title'>#{popover_title_text}</div>",
        content: "<a class='autodevops-link' href='#{popover_content_url}' target='_blank' rel='noopener noreferrer nofollow'>#{popover_content_text}</a>",
      } }
        Auto DevOps
    - if @pipeline.detached_merge_request_pipeline?
      %span.js-pipeline-url-mergerequest.badge.badge-info.has-tooltip{ title: "This pipeline is run on the source branch" }
        detached
    - if @pipeline.stuck?
      %span.js-pipeline-url-stuck.badge.badge-warning
        stuck

  .well-segment.branch-info
    .icon-container.commit-icon
      = custom_icon("icon_commit")
    = link_to commit.short_id, project_commit_path(@project, @pipeline.sha), class: "commit-sha js-details-short"
    = link_to("#", class: "js-details-expand d-none d-sm-none d-md-inline") do
      %span.text-expander
        = sprite_icon('ellipsis_h', size: 12)
    %span.js-details-content.hide
      = link_to @pipeline.sha, project_commit_path(@project, @pipeline.sha), class: "commit-sha commit-hash-full"
    = clipboard_button(text: @pipeline.sha, title: "Copy commit SHA to clipboard")