debian-mirror-gitlab/app/views/projects/merge_requests/widget/_heading.html.haml

58 lines
2.7 KiB
Text
Raw Normal View History

- if @pipeline
2015-10-24 18:46:33 +05:30
.mr-widget-heading
2016-08-24 12:49:21 +05:30
- %w[success success_with_warnings skipped canceled failed running pending].each do |status|
.ci_widget{ class: "ci-#{status}", style: ("display:none" unless @pipeline.status == status) }
2016-06-02 11:05:42 +05:30
= ci_icon_for_status(status)
%span
CI build
= ci_label_for_status(status)
for
2016-08-24 12:49:21 +05:30
- commit = @merge_request.diff_head_commit
2016-06-02 11:05:42 +05:30
= succeed "." do
= link_to @pipeline.short_sha, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, @pipeline.sha), class: "monospace"
2016-06-02 11:05:42 +05:30
%span.ci-coverage
= link_to "View details", builds_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: "js-show-tab", data: {action: 'builds'}
2015-10-24 18:46:33 +05:30
- elsif @merge_request.has_ci?
- # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
- # Remove in later versions when services like Jenkins will set CI status via Commit status API
2015-09-11 14:41:01 +05:30
.mr-widget-heading
2015-12-23 02:04:40 +05:30
- %w[success skipped canceled failed running pending].each do |status|
2015-09-11 14:41:01 +05:30
.ci_widget{class: "ci-#{status}", style: "display:none"}
2015-12-23 02:04:40 +05:30
= ci_icon_for_status(status)
%span
CI build
= ci_label_for_status(status)
for
2016-08-24 12:49:21 +05:30
- commit = @merge_request.diff_head_commit
2015-12-23 02:04:40 +05:30
= succeed "." do
= link_to commit.short_id, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, commit), class: "monospace"
2015-09-11 14:41:01 +05:30
%span.ci-coverage
2015-12-23 02:04:40 +05:30
- if details_path = ci_build_details_path(@merge_request)
= link_to "View details", details_path, :"data-no-turbolink" => "data-no-turbolink"
2015-09-11 14:41:01 +05:30
.ci_widget
= icon("spinner spin")
2016-08-24 12:49:21 +05:30
Checking CI status for #{@merge_request.diff_head_commit.short_id}…
2015-09-11 14:41:01 +05:30
.ci_widget.ci-not_found{style: "display:none"}
= icon("times-circle")
2016-08-24 12:49:21 +05:30
Could not find CI status for #{@merge_request.diff_head_commit.short_id}.
2015-09-11 14:41:01 +05:30
.ci_widget.ci-error{style: "display:none"}
= icon("times-circle")
2016-08-24 12:49:21 +05:30
Could not connect to the CI server. Please check your settings and try again.
2016-09-13 17:45:13 +05:30
- @merge_request.environments.each do |environment|
.mr-widget-heading
.ci_widget.ci-success
= ci_icon_for_status("success")
%span.hidden-sm
Deployed to
= succeed '.' do
= link_to environment.name, namespace_project_environment_path(@project.namespace, @project, environment), class: 'environment'
- external_url = environment.external_url
- if external_url
= link_to external_url, target: '_blank' do
= icon('external-link', text: "View on #{external_url.gsub(/\A.*?:\/\//, '')}", right: true)