diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-28 23:42:53 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-04-28 23:49:14 +0100 |
commit | 396dc838ed0d9cd088a27b1d36c44eebf7317762 (patch) | |
tree | 91eb09d1560f0192078cb0078b969fb3a7c7af12 | |
parent | 1a6ab40aced65ef5a2c5832e2a295f09ce61a590 (diff) | |
download | gitlab-ce-25226-realtime-pipelines-fe-tests.tar.gz |
Adds back needed files to render the jobs dropdown in pipeline mini graph25226-realtime-pipelines-fe-tests
-rw-r--r-- | app/assets/stylesheets/pages/pipelines.scss | 1 | ||||
-rw-r--r-- | app/views/ci/status/_dropdown_graph_badge.html.haml | 19 | ||||
-rw-r--r-- | app/views/projects/pipelines/_stage.html.haml | 5 |
3 files changed, 25 insertions, 0 deletions
diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 554959ef8b3..4f7991c93df 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -837,6 +837,7 @@ border-radius: 3px; // build name + .ci-build-text, .ci-status-text { font-weight: 200; overflow: hidden; diff --git a/app/views/ci/status/_dropdown_graph_badge.html.haml b/app/views/ci/status/_dropdown_graph_badge.html.haml new file mode 100644 index 00000000000..8ed23ac4919 --- /dev/null +++ b/app/views/ci/status/_dropdown_graph_badge.html.haml @@ -0,0 +1,19 @@ +-# Renders the content of each li in the dropdown + +- subject = local_assigns.fetch(:subject) +- status = subject.detailed_status(current_user) +- klass = "ci-status-icon ci-status-icon-#{status.group}" +- tooltip = "#{subject.name} - #{status.label}" + +- if status.has_details? + = link_to status.details_path, class: 'mini-pipeline-graph-dropdown-item', data: { toggle: 'tooltip', title: tooltip } do + %span{ class: klass }= custom_icon(status.icon) + %span.ci-build-text= subject.name +- else + .mini-pipeline-graph-dropdown-item{ data: { toggle: 'tooltip', title: tooltip } } + %span{ class: klass }= custom_icon(status.icon) + %span.ci-build-text= subject.name + +- if status.has_action? + = link_to status.action_path, class: 'ci-action-icon-wrapper js-ci-action-icon', method: status.action_method, data: { toggle: 'tooltip', title: status.action_title } do + = custom_icon(status.action_icon) diff --git a/app/views/projects/pipelines/_stage.html.haml b/app/views/projects/pipelines/_stage.html.haml new file mode 100644 index 00000000000..3feb99cfcd7 --- /dev/null +++ b/app/views/projects/pipelines/_stage.html.haml @@ -0,0 +1,5 @@ +- grouped_statuses = @stage.statuses.latest_ordered.group_by(&:status) +- HasStatus::ORDERED_STATUSES.each do |ordered_status| + - grouped_statuses.fetch(ordered_status, []).each do |status| + %li + = render 'ci/status/dropdown_graph_badge', subject: status |