summaryrefslogtreecommitdiff
path: root/app/views/ci/status
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/ci/status')
-rw-r--r--app/views/ci/status/_badge.html.haml9
-rw-r--r--app/views/ci/status/_graph_badge.html.haml20
2 files changed, 5 insertions, 24 deletions
diff --git a/app/views/ci/status/_badge.html.haml b/app/views/ci/status/_badge.html.haml
index c00c7f7407e..39c7fb0eba2 100644
--- a/app/views/ci/status/_badge.html.haml
+++ b/app/views/ci/status/_badge.html.haml
@@ -1,12 +1,13 @@
- status = local_assigns.fetch(:status)
-- link = local_assigns.fetch(:link, true)
-- css_classes = "ci-status ci-#{status.group}"
+- link = local_assigns.fetch(:link, true)
+- title = local_assigns.fetch(:title, nil)
+- css_classes = "ci-status ci-#{status.group} #{'has-tooltip' if title.present?}"
- if link && status.has_details?
- = link_to status.details_path, class: css_classes do
+ = link_to status.details_path, class: css_classes, title: title do
= custom_icon(status.icon)
= status.text
- else
- %span{ class: css_classes }
+ %span{ class: css_classes, title: title }
= custom_icon(status.icon)
= status.text
diff --git a/app/views/ci/status/_graph_badge.html.haml b/app/views/ci/status/_graph_badge.html.haml
deleted file mode 100644
index 128b418090f..00000000000
--- a/app/views/ci/status/_graph_badge.html.haml
+++ /dev/null
@@ -1,20 +0,0 @@
--# Renders the graph node with both the status icon, status name and action icon
-
-- subject = local_assigns.fetch(:subject)
-- status = subject.detailed_status(current_user)
-- klass = "ci-status-icon ci-status-icon-#{status.group} js-ci-status-icon-#{status.group}"
-- tooltip = "#{subject.name} - #{status.label}"
-
-- if status.has_details?
- = link_to status.details_path, class: 'build-content has-tooltip', data: { toggle: 'tooltip', title: tooltip, container: 'body' } do
- %span{ class: klass }= custom_icon(status.icon)
- .ci-status-text= subject.name
-- else
- .build-content.has-tooltip{ data: { toggle: 'tooltip', title: tooltip } }
- %span{ class: klass }= custom_icon(status.icon)
- .ci-status-text= subject.name
-
-- if status.has_action?
- = link_to status.action_path, class: 'ci-action-icon-container has-tooltip', method: status.action_method, data: { toggle: 'tooltip', title: status.action_title, container: 'body' } do
- %i.ci-action-icon-wrapper{ class: "js-#{status.action_icon.dasherize}" }
- = custom_icon(status.action_icon)