From 67d161d8180b2de5041c030ebd266b227b29930f Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 3 Jun 2016 12:03:57 -0700 Subject: [PATCH] Fix for activity stream state, and hover state for power button on screens with width <900px --- .../activity-stream/activitystream.route.js | 27 ++++++++++--------- .../client/src/main-menu/main-menu.block.less | 15 ++++------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/awx/ui/client/src/activity-stream/activitystream.route.js b/awx/ui/client/src/activity-stream/activitystream.route.js index a7e1da313f..06977c591d 100644 --- a/awx/ui/client/src/activity-stream/activitystream.route.js +++ b/awx/ui/client/src/activity-stream/activitystream.route.js @@ -18,25 +18,26 @@ export default { label: "ACTIVITY STREAM" }, resolve: { - features: ['FeaturesService', 'ProcessErrors', '$state', function(FeaturesService, ProcessErrors, $state) { - FeaturesService.get() - .then(function(features) { + features: ['FeaturesService', 'ProcessErrors', '$state', '$rootScope', + function(FeaturesService, ProcessErrors, $state, $rootScope) { + var features = FeaturesService.get(); + if(features){ if(FeaturesService.featureEnabled('activity_streams')) { - // Good to go - pass the features along to the controller. return features; } else { - // The activity stream feature isn't enabled. Take the user - // back to the dashboard $state.go('dashboard'); } - }) - .catch(function (response) { - ProcessErrors(null, response.data, response.status, null, { - hdr: 'Error!', - msg: 'Failed to get feature info. GET returned status: ' + - response.status - }); + } + $rootScope.featuresConfigured.promise.then(function(features){ + if(features){ + if(FeaturesService.featureEnabled('activity_streams')) { + return features; + } + else { + $state.go('dashboard'); + } + } }); }], subTitle: diff --git a/awx/ui/client/src/main-menu/main-menu.block.less b/awx/ui/client/src/main-menu/main-menu.block.less index 94c2647127..eebeab1951 100644 --- a/awx/ui/client/src/main-menu/main-menu.block.less +++ b/awx/ui/client/src/main-menu/main-menu.block.less @@ -204,16 +204,11 @@ flex: initial!important; padding-top:0px; } - // gonna come back to this for hte hover when license is missing and - // screen size is less than 900px -- JT 6/2 - // .MainMenu-item--licenseMissing:hover{ - // padding-top:5px; - // border-bottom: 5px solid @menu-link-btm-hov; - // border-left: 0px; - // padding-left: 21px; - // padding-right: 21px; - // margin-right: -1px; - // } + + .MainMenu-item--licenseMissing:hover{ + padding-top:20px; + border-bottom: 5px solid @menu-link-btm-hov; + } .MainMenu-itemImage--licenseMissing{ font-size: 20px!important;