Redirect to WF details page when a Split Job is launched

This commit is contained in:
kialam 2018-10-02 15:22:16 -04:00 committed by AlanCoding
parent ef4a2cbebb
commit 04eec61387
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -41,7 +41,13 @@ function atLaunchTemplateCtrl (
selectedJobTemplate
.postLaunch({ id: vm.template.id })
.then(({ data }) => {
$state.go('output', { id: data.job, type: 'playbook' }, { reload: true });
/* Split Jobs: Redirect to WF Details page if returned
job type is a WF job */
if (data.type === 'workflow_job' && data.workflow_job !== null) {
$state.go('workflowResults', { id: data.workflow_job }, { reload: true });
} else {
$state.go('output', { id: data.job, type: 'playbook' }, { reload: true });
}
});
} else {
const promptData = {