Commit baa3d0b3 authored by Luke Bennett's avatar Luke Bennett

Added tooltip with jobs full name to build items in graph

Added status to build tooltip and removed status icon tooltip

Added Pipelines class to force tooltips ontop of the dropdown, we cannot do this with data attributes because dropdown toggle is already set

Corrected dispatcher invocation
parent b56f093c
...@@ -4,6 +4,17 @@ ...@@ -4,6 +4,17 @@
constructor() { constructor() {
$(document).off('click', '.toggle-pipeline-btn').on('click', '.toggle-pipeline-btn', this.toggleGraph); $(document).off('click', '.toggle-pipeline-btn').on('click', '.toggle-pipeline-btn', this.toggleGraph);
this.addMarginToBuildColumns(); this.addMarginToBuildColumns();
this.initGroupedPipelineTooltips();
}
initGroupedPipelineTooltips() {
$('.dropdown-menu-toggle', $('.grouped-pipeline-dropdown').parent()).each(function() {
const $this = $(this);
$this.tooltip({
title: $this.data('tooltip-title'),
placement: 'bottom'
});
});
} }
toggleGraph() { toggleGraph() {
......
...@@ -71,10 +71,10 @@ module CiStatusHelper ...@@ -71,10 +71,10 @@ module CiStatusHelper
Ci::Runner.shared.blank? Ci::Runner.shared.blank?
end end
def render_status_with_link(type, status, path = nil, tooltip_placement: 'auto left', cssclass: '', container: 'body') def render_status_with_link(type, status, path = nil, tooltip_placement: 'auto left', cssclass: '', container: 'body', show_tooltip: true)
klass = "ci-status-link ci-status-icon-#{status.dasherize} #{cssclass}" klass = "ci-status-link ci-status-icon-#{status.dasherize} #{cssclass}"
title = "#{type.titleize}: #{ci_label_for_status(status)}" title = "#{type.titleize}: #{ci_label_for_status(status)}"
data = { toggle: 'tooltip', placement: tooltip_placement, container: container } data = { toggle: 'tooltip', placement: tooltip_placement, container: container } if show_tooltip
if path if path
link_to ci_icon_for_status(status), path, link_to ci_icon_for_status(status), path,
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- is_playable = status.playable? && can?(current_user, :update_build, @project) - is_playable = status.playable? && can?(current_user, :update_build, @project)
%li.build{ class: ("playable" if is_playable) } %li.build{ class: ("playable" if is_playable) }
.curve .curve
.build-content .build-content{ { data: { toggle: 'tooltip', title: "#{group_name} - #{status.status}", placement: 'bottom' } } }
= render "projects/#{status.to_partial_path}_pipeline", subject: status = render "projects/#{status.to_partial_path}_pipeline", subject: status
- else - else
%li.build %li.build
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment