mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 20:05:03 -02:30
Sanizite node resource name on hover
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default ['$state','moment', '$timeout', '$window',
|
export default ['$state','moment', '$timeout', '$window', '$filter',
|
||||||
function($state, moment, $timeout, $window) {
|
function($state, moment, $timeout, $window, $filter) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
scope: {
|
scope: {
|
||||||
@@ -363,7 +363,7 @@ export default ['$state','moment', '$timeout', '$window',
|
|||||||
});
|
});
|
||||||
// Render the tooltip quickly in the dom and then remove. This lets us know how big the tooltip is so that we can place
|
// Render the tooltip quickly in the dom and then remove. This lets us know how big the tooltip is so that we can place
|
||||||
// it properly on the workflow
|
// it properly on the workflow
|
||||||
let tooltipDimensionChecker = $("<div style='visibility:hidden;font-size:12px;position:absolute;' class='WorkflowChart-tooltipContents'><span>" + resourceName + "</span></div>");
|
let tooltipDimensionChecker = $("<div style='visibility:hidden;font-size:12px;position:absolute;' class='WorkflowChart-tooltipContents'><span>" + $filter('sanitize')(resourceName) + "</span></div>");
|
||||||
$('body').append(tooltipDimensionChecker);
|
$('body').append(tooltipDimensionChecker);
|
||||||
let tipWidth = $(tooltipDimensionChecker).outerWidth();
|
let tipWidth = $(tooltipDimensionChecker).outerWidth();
|
||||||
let tipHeight = $(tooltipDimensionChecker).outerHeight();
|
let tipHeight = $(tooltipDimensionChecker).outerHeight();
|
||||||
@@ -376,7 +376,7 @@ export default ['$state','moment', '$timeout', '$window',
|
|||||||
.attr("height", tipHeight+20)
|
.attr("height", tipHeight+20)
|
||||||
.attr("class", "WorkflowChart-tooltip")
|
.attr("class", "WorkflowChart-tooltip")
|
||||||
.html(function(){
|
.html(function(){
|
||||||
return "<div class='WorkflowChart-tooltipContents'><span>" + resourceName + "</span></div><div class='WorkflowChart-tooltipArrow'></div>";
|
return "<div class='WorkflowChart-tooltipContents'><span>" + $filter('sanitize')(resourceName) + "</span></div><div class='WorkflowChart-tooltipArrow'></div>";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
d3.select("#node-" + d.id)
|
d3.select("#node-" + d.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user