Skip to content

Commit

Permalink
Check the completion of API data retrieval and urn off spinner on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis committed Mar 8, 2018
1 parent 63dbf09 commit e112af7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -168,6 +168,7 @@ ManageIQ.angular.app.controller('catalogItemFormController', ['$scope', 'catalog
vm.catalogItemModel = angular.copy(vm.modelCopy);
playbookReusableCodeMixin.formOptions(vm);
playbookReusableCodeMixin.cloudCredentialsList(vm, vm.catalogItemModel.provisioning_cloud_credential_id, vm.catalogItemModel.retirement_cloud_credential_id);
playbookReusableCodeMixin.checkFormDataRetrieval(vm);
$scope.angularForm.$setUntouched(true);
$scope.angularForm.$setPristine(true);
miqService.miqFlash('warn', __('All changes have been reset'));
Expand Down
Expand Up @@ -174,6 +174,10 @@ function playbookReusableCodeMixin(API, $q, miqService) {
})
.catch(miqService.handleFailure)
);
checkFormDataRetrieval(vm);
};

var checkFormDataRetrieval = function(vm) {
$q.all(allApiPromises)
.then(retrievedFormData(vm));
};
Expand Down Expand Up @@ -242,5 +246,6 @@ function playbookReusableCodeMixin(API, $q, miqService) {
formCloudCredentials: formCloudCredentials,
repositoryChanged: repositoryChanged,
setIfDefined: setIfDefined,
checkFormDataRetrieval: checkFormDataRetrieval,
};
}

0 comments on commit e112af7

Please sign in to comment.