diff --git a/awx/ui/client/features/templates/templatesList.controller.js b/awx/ui/client/features/templates/templatesList.controller.js index e22f146e92..dc08a7bed6 100644 --- a/awx/ui/client/features/templates/templatesList.controller.js +++ b/awx/ui/client/features/templates/templatesList.controller.js @@ -181,12 +181,14 @@ function ListTemplatesController( }; function refreshTemplates() { + Wait('start'); let path = GetBasePath('unified_job_templates'); qs.search(path, $state.params.template_search) .then(function(searchResponse) { vm.dataset = searchResponse.data; vm.templates = vm.dataset.results; - }); + }) + .finally(() => Wait('stop')); } function createErrorHandler(path, action) { diff --git a/awx/ui/client/src/templates/prompt/prompt.controller.js b/awx/ui/client/src/templates/prompt/prompt.controller.js index a849e8b873..1c5c33a6c5 100644 --- a/awx/ui/client/src/templates/prompt/prompt.controller.js +++ b/awx/ui/client/src/templates/prompt/prompt.controller.js @@ -20,6 +20,7 @@ export default [ 'Rest', 'GetBasePath', 'ProcessErrors', 'CredentialTypeModel', vm.actionButtonClicked = false; if(vm.promptData && vm.promptData.triggerModalOpen) { + scope.$emit('launchModalOpen', true); vm.promptDataClone = _.cloneDeep(vm.promptData); vm.steps = { @@ -193,8 +194,6 @@ export default [ 'Rest', 'GetBasePath', 'ProcessErrors', 'CredentialTypeModel', modal.onClose = () => { scope.$emit('launchModalOpen', false); }; - - scope.$emit('launchModalOpen', true); }) .catch(({data, status}) => { ProcessErrors(scope, data, status, null, {