mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
Updated tooltip for sparklines
This commit is contained in:
@@ -1,13 +1,23 @@
|
|||||||
import smartStatusController from 'tower/smart-status/smart-status.controller.js';
|
import smartStatusController from 'tower/smart-status/smart-status.controller.js';
|
||||||
export default [ '$location', function($location) {
|
export default [ function() {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
link: function (scope){
|
link: function (scope){
|
||||||
var str = scope.job_template.id+'_spark';
|
var str = scope.job_template.id+'_spark';
|
||||||
scope[str].formatter = function(sparklines, options, point){
|
scope[str].formatter = function(sparklines, options, point){
|
||||||
return "<div class=\"smart-status-tooltip\"><span style=\"color: " + point.color + "\">●</span>" +
|
var status;
|
||||||
"Job id: " +
|
if(point.value === 1){
|
||||||
options.userOptions.tooltipValueLookups.jobs[point.offset] + "</div>" ;
|
status = "Successful";
|
||||||
|
}
|
||||||
|
else if(point.value === -1){
|
||||||
|
status = "Failed";
|
||||||
|
}
|
||||||
|
// else if(isNaN(point.value)){
|
||||||
|
// status = "Running";
|
||||||
|
// }
|
||||||
|
return "<div class=\"smart-status-tooltip\">Job ID: " +
|
||||||
|
options.userOptions.tooltipValueLookups.jobs[point.offset] +
|
||||||
|
"<br>Status: <span style=\"color: " + point.color + "\">●</span>"+status+"</div>" ;
|
||||||
};
|
};
|
||||||
|
|
||||||
$('aw-smart-status:eq('+scope.$index+')').sparkline(scope[str].sparkArray, {
|
$('aw-smart-status:eq('+scope.$index+')').sparkline(scope[str].sparkArray, {
|
||||||
|
|||||||
@@ -185,11 +185,16 @@ a:focus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jqstooltip{
|
||||||
|
background-color: black !important;
|
||||||
|
}
|
||||||
|
|
||||||
.smart-status-tooltip{
|
.smart-status-tooltip{
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
background-color: black;
|
font-family: 'Open Sans';
|
||||||
|
background-color: black;
|
||||||
span {
|
span {
|
||||||
padding: 14px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user