debian-mirror-gitlab/app/views/projects/pipelines/_info.html.haml

76 lines
5.2 KiB
Text
Raw Normal View History

2023-01-13 00:05:48 +05:30
- if Feature.enabled?(:pipeline_name, @pipeline.project) && @pipeline.name
2023-03-04 22:38:38 +05:30
.gl-border-t.gl-p-5.gl-px-0
%h3.gl-m-0.gl-text-body
= @pipeline.name
2023-01-13 00:05:48 +05:30
- else
.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))
2016-06-02 11:05:42 +05:30
2018-11-18 11:00:15 +05:30
.info-well
2022-08-13 15:12:31 +05:30
.well-segment.pipeline-info{ class: "gl-align-items-baseline!" }
.icon-container
= sprite_icon('clock', css_class: 'gl-top-0!')
2022-11-25 23:54:43 +05:30
- jobs = n_('%d job', '%d jobs', @pipeline.total_size) % @pipeline.total_size
2019-02-02 18:00:53 +05:30
- if @pipeline.duration
2022-11-25 23:54:43 +05:30
= s_('Pipelines|%{jobs} %{ref_text} in %{duration}').html_safe % { jobs: jobs, ref_text: @pipeline.ref_text, duration: time_interval_in_words(@pipeline.duration) }
- else
= jobs
= @pipeline.ref_text
2019-02-02 18:00:53 +05:30
- if @pipeline.queued_duration
2022-11-25 23:54:43 +05:30
= s_("Pipelines|(queued for %{queued_duration})") % { queued_duration: time_interval_in_words(@pipeline.queued_duration)}
2017-08-17 22:00:37 +05:30
2021-12-11 22:18:48 +05:30
- if has_pipeline_badges?(@pipeline)
2023-01-13 00:05:48 +05:30
.well-segment
2021-12-11 22:18:48 +05:30
.icon-container
2022-08-13 15:12:31 +05:30
= sprite_icon('flag', css_class: 'gl-top-0!')
2022-11-25 23:54:43 +05:30
- if @pipeline.schedule?
= gl_badge_tag _('Scheduled'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-scheduled', title: _('This pipeline was triggered by a schedule.') }
2021-12-11 22:18:48 +05:30
- if @pipeline.child?
2022-03-02 08:16:31 +05:30
- text = sprintf(s_('Pipelines|Child pipeline (%{link_start}parent%{link_end})'), { link_start: "<a href='#{pipeline_path(@pipeline.triggered_by_pipeline)}' class='text-underline'>", link_end: "</a>"}).html_safe
= gl_badge_tag text, { variant: :info, size: :sm }, { class: 'js-pipeline-child has-tooltip', title: s_("Pipelines|This is a child pipeline within the parent pipeline") }
2021-12-11 22:18:48 +05:30
- if @pipeline.latest?
2022-03-02 08:16:31 +05:30
= gl_badge_tag s_('Pipelines|latest'), { variant: :success, size: :sm }, { class: 'js-pipeline-url-latest has-tooltip', title: _("Latest pipeline for the most recent commit on this branch") }
2021-12-11 22:18:48 +05:30
- if @pipeline.merge_train_pipeline?
2022-05-07 20:08:51 +05:30
= gl_badge_tag s_('Pipelines|merge train'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-train has-tooltip', title: s_("Pipelines|This pipeline ran on the contents of this merge request combined with the contents of all other merge requests queued for merging into the target branch.") }
2021-12-11 22:18:48 +05:30
- if @pipeline.has_yaml_errors?
2022-03-02 08:16:31 +05:30
= gl_badge_tag s_('Pipelines|yaml invalid'), { variant: :danger, size: :sm }, { class: 'js-pipeline-url-yaml has-tooltip', title: @pipeline.yaml_errors }
2021-12-11 22:18:48 +05:30
- if @pipeline.failure_reason?
2022-03-02 08:16:31 +05:30
= gl_badge_tag s_('Pipelines|error'), { variant: :danger, size: :sm }, { class: 'js-pipeline-url-failure has-tooltip', title: @pipeline.failure_reason }
2021-12-11 22:18:48 +05:30
- if @pipeline.auto_devops_source?
- popover_title_text = html_escape(_('This pipeline makes use of a predefined CI/CD configuration enabled by %{b_open}Auto DevOps.%{b_close}')) % { b_open: '<b>'.html_safe, b_close: '</b>'.html_safe }
- popover_content_url = help_page_path('topics/autodevops/index.md')
- popover_content_text = _('Learn more about Auto DevOps')
2022-03-02 08:16:31 +05:30
= gl_badge_tag s_('Pipelines|Auto DevOps'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-autodevops', href: "#", tabindex: "0", role: "button", data: { container: 'body', toggle: 'popover', placement: 'top', html: 'true', triggers: 'focus', title: "<div class='gl-font-weight-normal gl-line-height-normal'>#{popover_title_text}</div>", content: "<a href='#{popover_content_url}' target='_blank' rel='noopener noreferrer nofollow'>#{popover_content_text}</a>" } }
2021-12-11 22:18:48 +05:30
- if @pipeline.detached_merge_request_pipeline?
2023-03-04 22:38:38 +05:30
= gl_badge_tag s_('Pipelines|merge request'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-mergerequest has-tooltip', data: { qa_selector: 'merge_request_badge_tag' }, title: s_("Pipelines|This pipeline ran on the contents of this merge request's source branch, not the target branch.") }
2021-12-11 22:18:48 +05:30
- if @pipeline.stuck?
2022-03-02 08:16:31 +05:30
= gl_badge_tag s_('Pipelines|stuck'), { variant: :warning, size: :sm }, { class: 'js-pipeline-url-stuck has-tooltip' }
2019-02-15 15:39:39 +05:30
2023-01-13 00:05:48 +05:30
.well-segment{ 'data-testid': 'commit-row' }
2018-11-18 11:00:15 +05:30
.icon-container.commit-icon
2022-08-13 15:12:31 +05:30
= sprite_icon('commit', css_class: 'gl-top-0!')
2023-01-13 00:05:48 +05:30
- if Feature.enabled?(:pipeline_name, @pipeline.project) && @pipeline.name
= markdown(commit.title, pipeline: :single_line)
= clipboard_button(text: @pipeline.sha, title: _("Copy commit SHA"))
= link_to commit.short_id, project_commit_path(@project, @pipeline.sha), class: "commit-sha"
- else
= link_to commit.short_id, project_commit_path(@project, @pipeline.sha), class: "commit-sha"
= clipboard_button(text: @pipeline.sha, title: _("Copy commit SHA"))
2019-12-21 20:55:43 +05:30
.well-segment.related-merge-request-info
.icon-container
2022-08-13 15:12:31 +05:30
= sprite_icon("git-merge", css_class: 'gl-top-0!')
2019-12-21 20:55:43 +05:30
%span.related-merge-requests
2020-03-13 15:44:24 +05:30
%span.js-truncated-mr-list
= @pipeline.all_related_merge_request_text(limit: 1)
- if @pipeline.has_many_merge_requests?
= link_to("#", class: "js-toggle-mr-list") do
%span.text-expander
= sprite_icon('ellipsis_h', size: 12)
%span.js-full-mr-list.hide
= @pipeline.all_related_merge_request_text