diff --git a/awx/ui/client/src/inventories-hosts/inventories/insights/insights.block.less b/awx/ui/client/src/inventories-hosts/inventories/insights/insights.block.less index f651c30cf3..e1ac5a80f7 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/insights/insights.block.less +++ b/awx/ui/client/src/inventories-hosts/inventories/insights/insights.block.less @@ -64,14 +64,15 @@ } .InsightsNav-anchor.is-currentFilter{ + background-color: @f2grey; padding-top: 5px; - border-bottom: 5px solid @menu-link-btm-hov; + border-bottom: 5px solid @b7grey; } .InsightsNav-anchor:hover{ - background-color: @menu-link-bg-hov; + background-color: @f2grey; padding-top: 5px; - border-bottom: 5px solid @menu-link-btm-hov; + border-bottom: 5px solid @b7grey; } .InsightsNav-totalIssues{ @@ -99,6 +100,22 @@ background-color: @b7grey; } +.InsightsNav-refresh{ + color: @default-icon; + cursor: pointer; + margin-left: 10px; + margin-right: 10px; +} + +.InsightsNav-refresh:hover{ + color: @default-link; +} + +.InsightsBody-missingIssues{ + color: @default-icon; + margin: 10px 0px 10px 0px; +} + .InsightsRow{ margin-top:10px; } diff --git a/awx/ui/client/src/inventories-hosts/inventories/insights/insights.controller.js b/awx/ui/client/src/inventories-hosts/inventories/insights/insights.controller.js index b050866277..88c70ee00a 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/insights/insights.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/insights/insights.controller.js @@ -9,8 +9,8 @@ export default [ 'InsightsData', '$scope', 'moment', '$state', 'InventoryData', function (data, $scope, moment, $state, InventoryData, InsightsService) { function init() { - $scope.reports = data.reports; - $scope.reports_dataset = data; + $scope.reports = (data && data.reports) ? data.reports : []; + $scope.reports_dataset = (data) ? data : {}; $scope.currentFilter = "total"; $scope.solvable_count = filter('solvable').length; $scope.not_solvable_count = filter('not_solvable').length; @@ -20,8 +20,11 @@ function (data, $scope, moment, $state, InventoryData, InsightsService) { $scope.low_count =filter('low').length; let a = moment(), b = moment($scope.reports_dataset.last_check_in); $scope.last_check_in = a.diff(b, 'hours'); - $scope.inventory = InventoryData; - $scope.insights_credential = InventoryData.summary_fields.insights_credential.id; + $scope.inventory = (InventoryData) ? InventoryData : {}; + $scope.insights_credential = (InventoryData && InventoryData.summary_fields && + InventoryData.summary_fields.insights_credential && InventoryData.summary_fields.insights_credential.id) ? + InventoryData.summary_fields.insights_credential.id : null; + } function filter(str){ diff --git a/awx/ui/client/src/inventories-hosts/inventories/insights/insights.partial.html b/awx/ui/client/src/inventories-hosts/inventories/insights/insights.partial.html index e1f2ee91d3..fa05459114 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/insights/insights.partial.html +++ b/awx/ui/client/src/inventories-hosts/inventories/insights/insights.partial.html @@ -50,10 +50,22 @@