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 d68670df97..5c11690988 100644 --- a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js +++ b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js @@ -8,6 +8,7 @@ export default var streamConfig = {}; scope.showActivityStreamButton = false; + scope.loadingLicense = true; scope.openActivityStream = function() { @@ -39,12 +40,14 @@ export default FeaturesService.get() .then(function() { + scope.loadingLicense = false; if(FeaturesService.featureEnabled('activity_streams')) { scope.showActivityStreamButton = true; } else { scope.showActivityStreamButton = false; } + scope.licenseType = FeaturesService.getLicenseInfo()['license_type']; }) .catch(function (response) { ProcessErrors(null, response.data, response.status, null, { 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 679da65803..a03f45f5e0 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= "licenseMissing" + ng-hide= "loadingLicense || licenseMissing || licenseType == 'basic'" ng-click="openActivityStream()"> @@ -21,7 +21,7 @@ data-placement="left" data-trigger="hover" data-container="body" - ng-hide="licenseMissing" + ng-hide="loadingLicense || licenseMissing || licenseType == 'basic'" ng-if="!showActivityStreamButton"> diff --git a/awx/ui/client/src/shared/features/features.service.js b/awx/ui/client/src/shared/features/features.service.js index 6bb7a8a54d..ab44f354ba 100644 --- a/awx/ui/client/src/shared/features/features.service.js +++ b/awx/ui/client/src/shared/features/features.service.js @@ -6,12 +6,15 @@ export default ['$rootScope', 'Rest', 'GetBasePath', 'ProcessErrors', '$http', '$q', function ($rootScope, Rest, GetBasePath, ProcessErrors, $http, $q) { + var license_info; + return { getFeatures: function(){ var promise; Rest.setUrl(GetBasePath('config')); promise = Rest.get(); return promise.then(function (data) { + license_info = data.data.license_info; $rootScope.features = data.data.license_info.features; return $rootScope.features; }).catch(function (response) { @@ -21,7 +24,6 @@ function ($rootScope, Rest, GetBasePath, ProcessErrors, $http, $q) { response.status }); }); - }, get: function(){ if(_.isEmpty($rootScope.features)){ @@ -39,6 +41,9 @@ function ($rootScope, Rest, GetBasePath, ProcessErrors, $http, $q) { else { return false; } + }, + getLicenseInfo: function() { + return license_info; } }; }];