From 2d286c5f6852889d4e0cc5c9326f7e164b913ad3 Mon Sep 17 00:00:00 2001 From: kialam Date: Thu, 18 Oct 2018 10:19:17 -0400 Subject: [PATCH] Redirect to WF Details page after prompt for slice JT. --- .../launchTemplateButton.component.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/lib/components/launchTemplateButton/launchTemplateButton.component.js b/awx/ui/client/lib/components/launchTemplateButton/launchTemplateButton.component.js index 5ff065c0c3..20cf1d8e94 100644 --- a/awx/ui/client/lib/components/launchTemplateButton/launchTemplateButton.component.js +++ b/awx/ui/client/lib/components/launchTemplateButton/launchTemplateButton.component.js @@ -148,7 +148,13 @@ function atLaunchTemplateCtrl ( id: vm.promptData.template, launchData: jobLaunchData }).then((launchRes) => { - $state.go('output', { id: launchRes.data.job, type: 'playbook' }, { reload: true }); + /* Slice Jobs: Redirect to WF Details page if returned + job type is a WF job */ + if (launchRes.data.type === 'workflow_job' && launchRes.data.workflow_job !== null) { + $state.go('workflowResults', { id: launchRes.data.workflow_job }, { reload: true }); + } else { + $state.go('output', { id: launchRes.data.job, type: 'playbook' }, { reload: true }); + } }).catch(createErrorHandler('launch job template', 'POST')); } else if (vm.promptData.templateType === 'workflow_job_template') { workflowTemplate.create().postLaunch({