mirror of
https://github.com/ansible/awx.git
synced 2026-01-26 16:11:30 -03:30
More styling on the tooltip for smart status
This commit is contained in:
parent
ec39c5c864
commit
23254beb6c
@ -1,6 +1,6 @@
|
||||
export default ['$scope', function ($scope) {
|
||||
|
||||
var str = $scope.job_template.id+'_spark',
|
||||
var str = $scope.job_template.id+'_smart',
|
||||
recentJobs = $scope.job_template.summary_fields.recent_jobs;
|
||||
$scope[str] = {
|
||||
id: $scope.job_template.id,
|
||||
|
||||
@ -3,7 +3,8 @@ export default [ function() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
link: function (scope){
|
||||
var str = scope.job_template.id+'_spark';
|
||||
var str = scope.job_template.id+'_smart';
|
||||
|
||||
scope[str].formatter = function(sparklines, options, point){
|
||||
var status;
|
||||
if(point.value === 1){
|
||||
@ -12,9 +13,9 @@ export default [ function() {
|
||||
else if(point.value === -1){
|
||||
status = "Failed";
|
||||
}
|
||||
// else if(isNaN(point.value)){
|
||||
// status = "Running";
|
||||
// }
|
||||
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>" ;
|
||||
@ -27,18 +28,12 @@ export default [ function() {
|
||||
barWidth: 7,
|
||||
barSpacing: 2,
|
||||
zeroBarColor: 'grey',
|
||||
posBarColor: '#00aa00', //@green on ansible-ui
|
||||
negBarColor: '#aa0000', //@red
|
||||
posBarColor: '#00aa00',
|
||||
negBarColor: '#aa0000',
|
||||
tooltipFormatter: scope[str].formatter,
|
||||
tooltipFormat: '{{value:jobs}}',
|
||||
tooltipValueLookups: {
|
||||
jobs: scope[str].jobIds
|
||||
// $.range_map({
|
||||
// '1': 'Success',
|
||||
// '-1': 'Failed',
|
||||
// '0' : 'Queued'
|
||||
// // '7:': 'High'
|
||||
// })
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -187,12 +187,15 @@ a:focus {
|
||||
|
||||
.jqstooltip{
|
||||
background-color: black !important;
|
||||
border-radius:4px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.smart-status-tooltip{
|
||||
font-size: 12px;
|
||||
font-family: 'Open Sans';
|
||||
background-color: black;
|
||||
border-radius:4px;
|
||||
span {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user