mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
Updated tooltip for sparklines
This commit is contained in:
parent
1e68785264
commit
ec39c5c864
@ -1,13 +1,23 @@
|
||||
import smartStatusController from 'tower/smart-status/smart-status.controller.js';
|
||||
export default [ '$location', function($location) {
|
||||
export default [ function() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
link: function (scope){
|
||||
var str = scope.job_template.id+'_spark';
|
||||
scope[str].formatter = function(sparklines, options, point){
|
||||
return "<div class=\"smart-status-tooltip\"><span style=\"color: " + point.color + "\">●</span>" +
|
||||
"Job id: " +
|
||||
options.userOptions.tooltipValueLookups.jobs[point.offset] + "</div>" ;
|
||||
var status;
|
||||
if(point.value === 1){
|
||||
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, {
|
||||
|
||||
@ -185,11 +185,16 @@ a:focus {
|
||||
}
|
||||
}
|
||||
|
||||
.jqstooltip{
|
||||
background-color: black !important;
|
||||
}
|
||||
|
||||
.smart-status-tooltip{
|
||||
font-size: 14px;
|
||||
background-color: black;
|
||||
font-size: 12px;
|
||||
font-family: 'Open Sans';
|
||||
background-color: black;
|
||||
span {
|
||||
padding: 14px;
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user