More styling on the tooltip for smart status

This commit is contained in:
Jared Tabor 2015-03-10 10:57:35 -04:00
parent ec39c5c864
commit 23254beb6c
3 changed files with 11 additions and 13 deletions

View File

@ -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,

View File

@ -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 + "\">&#9679;</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'
// })
}
});

View File

@ -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;
}