From 23254beb6cc0d8b5c988c595421ea0493ba1e55f Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 10 Mar 2015 10:57:35 -0400 Subject: [PATCH] More styling on the tooltip for smart status --- .../smart-status/smart-status.controller.js | 2 +- .../js/smart-status/smart-status.directive.js | 19 +++++++------------ awx/ui/static/less/ansible-ui.less | 3 +++ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/awx/ui/static/js/smart-status/smart-status.controller.js b/awx/ui/static/js/smart-status/smart-status.controller.js index 12b2178406..00190b3151 100644 --- a/awx/ui/static/js/smart-status/smart-status.controller.js +++ b/awx/ui/static/js/smart-status/smart-status.controller.js @@ -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, diff --git a/awx/ui/static/js/smart-status/smart-status.directive.js b/awx/ui/static/js/smart-status/smart-status.directive.js index 89d87abfdb..7d291f5cc5 100644 --- a/awx/ui/static/js/smart-status/smart-status.directive.js +++ b/awx/ui/static/js/smart-status/smart-status.directive.js @@ -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 "
Job ID: " + options.userOptions.tooltipValueLookups.jobs[point.offset] + "
Status: "+status+"
" ; @@ -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' - // }) } }); diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index c79be1ccda..e9166df954 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -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; }