mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 18:20:00 -03:30
add wait start and stop to add service
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
export default
|
export default
|
||||||
angular.module('rbacUiControl', [])
|
angular.module('rbacUiControl', [])
|
||||||
.service('rbacUiControlService', ['$q', 'GetBasePath', 'Rest', function($q, GetBasePath, Rest){
|
.service('rbacUiControlService', ['$q', 'GetBasePath', 'Rest', 'Wait', function($q, GetBasePath, Rest, Wait){
|
||||||
this.canAdd = function(apiPath) {
|
this.canAdd = function(apiPath) {
|
||||||
var canAddVal = $q.defer();
|
var canAddVal = $q.defer();
|
||||||
|
|
||||||
@@ -16,6 +16,7 @@ export default
|
|||||||
Rest.setUrl(GetBasePath(apiPath));
|
Rest.setUrl(GetBasePath(apiPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Wait("start");
|
||||||
Rest.options()
|
Rest.options()
|
||||||
.success(function(data) {
|
.success(function(data) {
|
||||||
if (data.actions.POST) {
|
if (data.actions.POST) {
|
||||||
@@ -23,6 +24,7 @@ export default
|
|||||||
} else {
|
} else {
|
||||||
canAddVal.reject(false);
|
canAddVal.reject(false);
|
||||||
}
|
}
|
||||||
|
Wait("stop");
|
||||||
});
|
});
|
||||||
|
|
||||||
return canAddVal.promise;
|
return canAddVal.promise;
|
||||||
|
|||||||
Reference in New Issue
Block a user