summaryrefslogtreecommitdiff
path: root/app/views/projects/merge_requests/widget/_heading.html.haml
diff options
context:
space:
mode:
authorZ.J. van de Weg <zegerjan@gitlab.com>2016-08-02 14:01:22 +0200
committerZ.J. van de Weg <zegerjan@gitlab.com>2016-08-11 21:29:57 +0200
commit49f72e705fa225175834b5e6b2b1f78f1f608b9c (patch)
treeeeb8ab64c3aa954989b420b58b3f646e83782085 /app/views/projects/merge_requests/widget/_heading.html.haml
parentcbafc9ef301dbdc3c3205541cd0f8e31e28ece7a (diff)
downloadgitlab-ce-49f72e705fa225175834b5e6b2b1f78f1f608b9c.tar.gz
Show deployment status on a MR view
Diffstat (limited to 'app/views/projects/merge_requests/widget/_heading.html.haml')
-rw-r--r--app/views/projects/merge_requests/widget/_heading.html.haml40
1 files changed, 26 insertions, 14 deletions
diff --git a/app/views/projects/merge_requests/widget/_heading.html.haml b/app/views/projects/merge_requests/widget/_heading.html.haml
index 6ef640bb654..0581659b742 100644
--- a/app/views/projects/merge_requests/widget/_heading.html.haml
+++ b/app/views/projects/merge_requests/widget/_heading.html.haml
@@ -1,21 +1,22 @@
- if @pipeline
.mr-widget-heading
- - %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) }
- = ci_icon_for_status(status)
- %span
- CI build
- = ci_label_for_status(status)
- for
- - commit = @merge_request.diff_head_commit
- = succeed "." do
- = link_to @pipeline.short_sha, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, @pipeline.sha), class: "monospace"
- %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'}
+ - @merge_request.environments.each do |environments|
+ - %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) }
+ = ci_icon_for_status(status)
+ %span
+ CI build
+ = ci_label_for_status(status)
+ for
+ - commit = @merge_request.diff_head_commit
+ = succeed "." do
+ = link_to @pipeline.short_sha, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, @pipeline.sha), class: "monospace"
+ %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'}
- 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
+ // 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
.mr-widget-heading
- %w[success skipped canceled failed running pending].each do |status|
.ci_widget{class: "ci-#{status}", style: "display:none"}
@@ -42,3 +43,14 @@
.ci_widget.ci-error{style: "display:none"}
= icon("times-circle")
Could not connect to the CI server. Please check your settings and try again.
+
+- @merge_request.environments.each do |environment|
+ .mr-widget-heading
+ .ci_widget{ class: "ci-success" }
+ = ci_icon_for_status("success")
+ %span
+ Released to #{environment.name}
+ = succeed '.' do
+ = time_ago_with_tooltip(environment.created_at, placement: 'bottom')
+ - if environment.external_url
+ = link_to icon('external-link'), environment.external_url