diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index e58f1ee924..98db6a9b33 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -245,10 +245,9 @@ var tower = angular.module('Tower', [ label: "DASHBOARD" }, resolve: { - graphData: ['$q', 'jobStatusGraphData', 'FeaturesService', function($q, jobStatusGraphData, FeaturesService) { + graphData: ['$q', 'jobStatusGraphData', function($q, jobStatusGraphData) { return $q.all({ jobStatus: jobStatusGraphData.get("month", "all"), - // features: FeaturesService.get() }); }] } @@ -830,10 +829,6 @@ var tower = angular.module('Tower', [ }); $rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState) { - // catch license expiration notifications immediately after user logs in, redirect - // if (fromState.name === 'signIn'){ - // CheckLicense.notify(); - // } if(fromState.name === 'license' && toParams.hasOwnProperty('licenseMissing')){ $rootScope.licenseMissing = toParams.licenseMissing; diff --git a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js index 3b3f0a0080..ee1670ecd9 100644 --- a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js +++ b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js @@ -1,5 +1,5 @@ export default - ['templateUrl', '$state', 'FeaturesService', 'ProcessErrors', '$rootScope', + ['templateUrl', '$state', 'FeaturesService', 'ProcessErrors','$rootScope', function(templateUrl, $state, FeaturesService, ProcessErrors, $rootScope) { return { restrict: 'E', @@ -11,7 +11,7 @@ export default scope.showActivityStreamButton = false; scope.loadingLicense = true; - scope.openActivityStream = function() { + scope.toggleActivityStream = function() { var stateGoParams = {}; @@ -29,44 +29,46 @@ export default scope.$on("$stateChangeStart", function updateActivityStreamButton(event, toState) { - streamConfig = (toState && toState.data) ? toState.data : {}; + streamConfig = (toState && toState.data) ? toState.data : {}; - if(streamConfig && streamConfig.activityStream) { + if(streamConfig && streamConfig.activityStream) { - // Check to see if activity_streams is an enabled feature. $stateChangeSuccess fires - // after the resolve on the state declaration so features should be available at this - // point. We use the get() function call here just in case the features aren't available. - // The get() function will only fire off the server call if the features aren't already - // attached to the $rootScope. - var features = FeaturesService.get(); - if(features){ - scope.loadingLicense = false; - scope.activityStreamActive = (toState.name === 'activityStream') ? true : false; - scope.showActivityStreamButton = (FeaturesService.featureEnabled('activity_streams') || toState.name ==='activityStream') ? true : false; - } - } - else { - scope.showActivityStreamButton = false; + // Check to see if activity_streams is an enabled feature. $stateChangeSuccess fires + // after the resolve on the state declaration so features should be available at this + // point. We use the get() function call here just in case the features aren't available. + // The get() function will only fire off the server call if the features aren't already + // attached to the $rootScope. + var features = FeaturesService.get(); + if(features){ - } - }); + scope.loadingLicense = false; + scope.activityStreamActive = (toState.name === 'activityStream') ? true : false; + scope.showActivityStreamButton = (FeaturesService.featureEnabled('activity_streams') || toState.name ==='activityStream') ? true : false; + } + } + else { - $rootScope.$on('featuresLoaded', function(){ - FeaturesService.get() - .then(function() { - scope.loadingLicense = false; - scope.activityStreamActive = ($state.name === 'activityStream') ? true : false; - scope.showActivityStreamButton = (FeaturesService.featureEnabled('activity_streams') || $state.name === 'activityStream') ? true : false; - }) - .catch(function (response) { - ProcessErrors(null, response.data, response.status, null, { - hdr: 'Error!', - msg: 'Failed to get feature info. GET returned status: ' + - response.status - }); - }); - }); + scope.showActivityStreamButton = false; - } - }; - }]; + } + }); + + $rootScope.$on('featuresLoaded', function(){ + FeaturesService.get() + .then(function() { + scope.loadingLicense = false; + scope.activityStreamActive = ($state.name === 'activityStream') ? true : false; + scope.showActivityStreamButton = (FeaturesService.featureEnabled('activity_streams') || $state.name === 'activityStream') ? true : false; + }) + .catch(function (response) { + ProcessErrors(null, response.data, response.status, null, { + hdr: 'Error!', + msg: 'Failed to get feature info. GET returned status: ' + + response.status + }); + }); + }); + + } + }; + }]; diff --git a/awx/ui/client/src/bread-crumb/bread-crumb.partial.html b/awx/ui/client/src/bread-crumb/bread-crumb.partial.html index 5520af9f3a..734de68414 100644 --- a/awx/ui/client/src/bread-crumb/bread-crumb.partial.html +++ b/awx/ui/client/src/bread-crumb/bread-crumb.partial.html @@ -8,7 +8,7 @@ data-container="body" ng-class="{'BreadCrumb-menuLinkActive' : activityStreamActive}" ng-if="showActivityStreamButton" - ng-hide= "loadingLicense || licenseMissing || licenseType == 'basic'" + ng-hide= "loadingLicense || licenseMissing" ng-click="toggleActivityStream()"> diff --git a/awx/ui/client/src/forms/JobTemplates.js b/awx/ui/client/src/forms/JobTemplates.js index 06ccbe6f39..c22db173f1 100644 --- a/awx/ui/client/src/forms/JobTemplates.js +++ b/awx/ui/client/src/forms/JobTemplates.js @@ -316,7 +316,8 @@ export default buttons: { //for now always generates