mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 17:07:36 -02:30
@@ -8,6 +8,7 @@ export default
|
|||||||
var streamConfig = {};
|
var streamConfig = {};
|
||||||
|
|
||||||
scope.showActivityStreamButton = false;
|
scope.showActivityStreamButton = false;
|
||||||
|
scope.loadingLicense = true;
|
||||||
|
|
||||||
scope.openActivityStream = function() {
|
scope.openActivityStream = function() {
|
||||||
|
|
||||||
@@ -39,12 +40,14 @@ export default
|
|||||||
|
|
||||||
FeaturesService.get()
|
FeaturesService.get()
|
||||||
.then(function() {
|
.then(function() {
|
||||||
|
scope.loadingLicense = false;
|
||||||
if(FeaturesService.featureEnabled('activity_streams')) {
|
if(FeaturesService.featureEnabled('activity_streams')) {
|
||||||
scope.showActivityStreamButton = true;
|
scope.showActivityStreamButton = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
scope.showActivityStreamButton = false;
|
scope.showActivityStreamButton = false;
|
||||||
}
|
}
|
||||||
|
scope.licenseType = FeaturesService.getLicenseInfo()['license_type'];
|
||||||
})
|
})
|
||||||
.catch(function (response) {
|
.catch(function (response) {
|
||||||
ProcessErrors(null, response.data, response.status, null, {
|
ProcessErrors(null, response.data, response.status, null, {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
data-container="body"
|
data-container="body"
|
||||||
ng-class="{'BreadCrumb-menuLinkActive' : activityStreamActive}"
|
ng-class="{'BreadCrumb-menuLinkActive' : activityStreamActive}"
|
||||||
ng-if="showActivityStreamButton"
|
ng-if="showActivityStreamButton"
|
||||||
ng-hide= "licenseMissing"
|
ng-hide= "loadingLicense || licenseMissing || licenseType == 'basic'"
|
||||||
ng-click="openActivityStream()">
|
ng-click="openActivityStream()">
|
||||||
<i class="BreadCrumb-menuLinkImage icon-activity-stream"
|
<i class="BreadCrumb-menuLinkImage icon-activity-stream"
|
||||||
alt="Activity Stream">
|
alt="Activity Stream">
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
data-placement="left"
|
data-placement="left"
|
||||||
data-trigger="hover"
|
data-trigger="hover"
|
||||||
data-container="body"
|
data-container="body"
|
||||||
ng-hide="licenseMissing"
|
ng-hide="loadingLicense || licenseMissing || licenseType == 'basic'"
|
||||||
ng-if="!showActivityStreamButton">
|
ng-if="!showActivityStreamButton">
|
||||||
<i class="BreadCrumb-menuLinkImage fa fa-tachometer"
|
<i class="BreadCrumb-menuLinkImage fa fa-tachometer"
|
||||||
alt="Dashboard">
|
alt="Dashboard">
|
||||||
|
|||||||
@@ -6,12 +6,15 @@
|
|||||||
|
|
||||||
export default ['$rootScope', 'Rest', 'GetBasePath', 'ProcessErrors', '$http', '$q',
|
export default ['$rootScope', 'Rest', 'GetBasePath', 'ProcessErrors', '$http', '$q',
|
||||||
function ($rootScope, Rest, GetBasePath, ProcessErrors, $http, $q) {
|
function ($rootScope, Rest, GetBasePath, ProcessErrors, $http, $q) {
|
||||||
|
var license_info;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
getFeatures: function(){
|
getFeatures: function(){
|
||||||
var promise;
|
var promise;
|
||||||
Rest.setUrl(GetBasePath('config'));
|
Rest.setUrl(GetBasePath('config'));
|
||||||
promise = Rest.get();
|
promise = Rest.get();
|
||||||
return promise.then(function (data) {
|
return promise.then(function (data) {
|
||||||
|
license_info = data.data.license_info;
|
||||||
$rootScope.features = data.data.license_info.features;
|
$rootScope.features = data.data.license_info.features;
|
||||||
return $rootScope.features;
|
return $rootScope.features;
|
||||||
}).catch(function (response) {
|
}).catch(function (response) {
|
||||||
@@ -21,7 +24,6 @@ function ($rootScope, Rest, GetBasePath, ProcessErrors, $http, $q) {
|
|||||||
response.status
|
response.status
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
get: function(){
|
get: function(){
|
||||||
if(_.isEmpty($rootScope.features)){
|
if(_.isEmpty($rootScope.features)){
|
||||||
@@ -39,6 +41,9 @@ function ($rootScope, Rest, GetBasePath, ProcessErrors, $http, $q) {
|
|||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
getLicenseInfo: function() {
|
||||||
|
return license_info;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
|
|||||||
Reference in New Issue
Block a user