From 66f37533ece3c70f7f42fc2a0b27bdc56ab61d9b Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Mon, 20 Feb 2017 14:45:12 -0500 Subject: [PATCH] Leave user on jobs list when relaunching adhoc command --- awx/ui/client/src/helpers/Adhoc.js | 4 +++- awx/ui/client/src/helpers/JobSubmission.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/helpers/Adhoc.js b/awx/ui/client/src/helpers/Adhoc.js index a192e41b5d..d29e591ce5 100644 --- a/awx/ui/client/src/helpers/Adhoc.js +++ b/awx/ui/client/src/helpers/Adhoc.js @@ -104,7 +104,9 @@ export default Rest.post(postData) .success(function (data) { Wait('stop'); - $state.go('adHocJobStdout', {id: data.id}); + if($location.path().replace(/^\//, '').split('/')[0] !== 'jobs') { + $state.go('adHocJobStdout', {id: data.id}); + } }) .error(function (data, status) { ProcessErrors(scope, data, status, { diff --git a/awx/ui/client/src/helpers/JobSubmission.js b/awx/ui/client/src/helpers/JobSubmission.js index 9f5163e1ae..c4fd62434d 100644 --- a/awx/ui/client/src/helpers/JobSubmission.js +++ b/awx/ui/client/src/helpers/JobSubmission.js @@ -46,6 +46,7 @@ function($compile, CreateDialog, Wait, ParseTypeChange) { label: "Launch", onClick: function() { scope.$emit(callback); + $('#password-modal').dialog('close'); }, icon: "fa-check", "class": "btn btn-primary",