Merge pull request #2615 from kialam/fix/1444-fix-auto-close-modal

Fix prompt modal closing prematurely on JT list page
This commit is contained in:
kialam 2018-07-20 11:47:00 -04:00 committed by GitHub
commit a04d3f817a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -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) {

View File

@ -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, {