summaryrefslogtreecommitdiff
path: root/app/views/projects/ci
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2016-12-14 12:10:56 +0000
committerFilipa Lacerda <filipa@gitlab.com>2016-12-15 19:53:57 +0000
commit1235d96e973258b9c968049945426cb28bea9998 (patch)
tree057e77e603341eb740a7ad81fbf51aca64ce5a5f /app/views/projects/ci
parent4ae28cb31d9f0915aac647e1befa61067b6932f1 (diff)
downloadgitlab-ce-1235d96e973258b9c968049945426cb28bea9998.tar.gz
Add dropdown statuses in mini-pipeline graph
Diffstat (limited to 'app/views/projects/ci')
-rw-r--r--app/views/projects/ci/pipelines/_pipeline.html.haml22
1 files changed, 19 insertions, 3 deletions
diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml
index 3f05a21990f..f17a0d668b7 100644
--- a/app/views/projects/ci/pipelines/_pipeline.html.haml
+++ b/app/views/projects/ci/pipelines/_pipeline.html.haml
@@ -43,10 +43,26 @@
%td.stage-cell
- pipeline.stages.each do |stage|
- if stage.status
+ - status = ci_label_for_status(stage.detailed_status)
+ - hasMultipleBuilds = stage.statuses.count > 1
- tooltip = "#{stage.name.titleize}: #{stage.status || 'not found'}"
- .stage-container
- = link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id, anchor: stage.name), class: "has-tooltip ci-status-icon-#{stage.status}", title: tooltip do
- = ci_icon_for_status(stage.status)
+
+ - if status
+ .stage-container
+ - if hasMultipleBuilds
+ .dropdown.inline
+ %a.dropdown-toggle{id: "dropdown-#{stage.name}", "data-toggle"=> "dropdown", "aria-haspopup"=> "true", "aria-expanded" => "false" }
+ = ci_icon_for_status(stage.detailed_status)
+ %span.caret
+ .dropdown-menu.grouped-pipeline-dropdown{"aria-labelledby"=> "dropdown-#{stage.name}"}
+ .arrow
+ %ul
+ - stage.statuses.each do |status|
+ %li
+ status
+ - else
+ = link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id, anchor: stage.name), class: "has-tooltip ci-status-icon-#{stage.status}", title: tooltip do
+ = ci_icon_for_status(stage.detailed_status)
%td
- if pipeline.duration