mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
add wait start and stop to add service
This commit is contained in:
parent
a7cbfdc242
commit
2482f6c46b
@ -6,7 +6,7 @@
|
||||
|
||||
export default
|
||||
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) {
|
||||
var canAddVal = $q.defer();
|
||||
|
||||
@ -16,6 +16,7 @@ export default
|
||||
Rest.setUrl(GetBasePath(apiPath));
|
||||
}
|
||||
|
||||
Wait("start");
|
||||
Rest.options()
|
||||
.success(function(data) {
|
||||
if (data.actions.POST) {
|
||||
@ -23,6 +24,7 @@ export default
|
||||
} else {
|
||||
canAddVal.reject(false);
|
||||
}
|
||||
Wait("stop");
|
||||
});
|
||||
|
||||
return canAddVal.promise;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user