Redirect to WF Details page after prompt for slice JT.

This commit is contained in:
kialam 2018-10-18 10:19:17 -04:00 committed by AlanCoding
parent f435e577b2
commit 2d286c5f68
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

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