From e1e677a653a1c6658ad7f3c9f4fbae7f120c8a8f Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Sat, 17 Dec 2016 12:55:26 +0000 Subject: [PATCH] Changes after review --- app/views/ci/status/_mini_graph_badge.html.haml | 5 ----- app/views/projects/ci/pipelines/_pipeline.html.haml | 13 +++++++------ 2 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 app/views/ci/status/_mini_graph_badge.html.haml 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