From 1235d96e973258b9c968049945426cb28bea9998 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Wed, 14 Dec 2016 12:10:56 +0000 Subject: Add dropdown statuses in mini-pipeline graph --- .../projects/ci/pipelines/_pipeline.html.haml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'app/views/projects/ci') 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 -- cgit v1.2.1