summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2016-12-17 12:55:26 +0000
committerFilipa Lacerda <filipa@gitlab.com>2016-12-17 14:01:04 +0000
commite1e677a653a1c6658ad7f3c9f4fbae7f120c8a8f (patch)
tree334efffdd1a36c7831b44c9548af27f9c47495b9
parent1aa3294cd2791ec0386059256560d22f7650620b (diff)
downloadgitlab-ce-e1e677a653a1c6658ad7f3c9f4fbae7f120c8a8f.tar.gz
Changes after review
-rw-r--r--app/views/ci/status/_mini_graph_badge.html.haml5
-rw-r--r--app/views/projects/ci/pipelines/_pipeline.html.haml13
2 files changed, 7 insertions, 11 deletions
diff --git a/app/views/ci/status/_mini_graph_badge.html.haml b/app/views/ci/status/_mini_graph_badge.html.haml
deleted file mode 100644
index 34e07e75ae8..00000000000
--- a/app/views/ci/status/_mini_graph_badge.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-- status = subject.detailed_status(current_user)
-- icon = "#{status.icon}_borderless"
-- klass = "ci-status-icon ci-status-icon-#{status}"
-
-%span{ class: klass }= custom_icon(icon)
diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml
index 0651447f616..2e2bac9cd32 100644
--- a/app/views/projects/ci/pipelines/_pipeline.html.haml
+++ b/app/views/projects/ci/pipelines/_pipeline.html.haml
@@ -44,10 +44,11 @@
- pipeline.stages.each do |stage|
- if stage.status
- detailed_status = stage.detailed_status(current_user)
- - details_path = detailed_status.details_path if detailed_status.has_details?
- klass = "has-tooltip ci-status-icon ci-status-icon-#{detailed_status}"
- hasMultipleBuilds = stage.statuses.count > 1
- - tooltip = "#{stage.name.titleize}: #{stage.status || 'not found'}"
+ - icon_status = "#{detailed_status.icon}_borderless"
+ - icon_status_klass = "ci-status-icon ci-status-icon-#{detailed_status}"
+ - tooltip = "#{stage.name}: #{detailed_status.label || 'not found'}"
.stage-container.mini-pipeline-graph
- if hasMultipleBuilds
@@ -55,7 +56,7 @@
%button.has-tooltip.builds-dropdown{ type: 'button', data: { toggle: 'dropdown', title: tooltip} }
%span{ class: klass }
%span.mini-pipeline-graph-icon-container
- = render 'ci/status/mini_graph_badge', subject: stage
+ %span{ class: icon_status_klass }= custom_icon(icon_status)
= icon('caret-down', class: 'dropdown-caret')
.dropdown-menu.grouped-pipeline-dropdown
.arrow-up
@@ -64,10 +65,10 @@
%li.dropdown-build
= render 'ci/status/graph_badge', subject: status
- else
- - if details_path
- = link_to details_path, class: klass, title: tooltip do
+ - if detailed_status.has_details?
+ = link_to detailed_status.details_path, class: klass, title: tooltip do
%span.mini-pipeline-graph-icon-container
- = render 'ci/status/mini_graph_badge', subject: stage
+ %span{ class: icon_status_klass }= custom_icon(icon_status)
%td
- if pipeline.duration