1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Get default wfjt extra vars so that we can show all extra vars on launch preview

This commit is contained in:
mabashian 2018-05-22 14:55:43 -04:00
parent 7d36bd1fb2
commit 87f4104304

View File

@ -73,12 +73,13 @@ function atLaunchTemplateCtrl (
} else if (vm.template.type === 'workflow_job_template') {
const selectedWorkflowJobTemplate = workflowTemplate.create();
const preLaunchPromises = [
selectedWorkflowJobTemplate.request('get', vm.template.id),
selectedWorkflowJobTemplate.getLaunch(vm.template.id),
selectedWorkflowJobTemplate.optionsLaunch(vm.template.id),
];
Promise.all(preLaunchPromises)
.then(([launchData, launchOptions]) => {
.then(([wfjtData, launchData, launchOptions]) => {
if (selectedWorkflowJobTemplate.canLaunchWithoutPrompt()) {
selectedWorkflowJobTemplate
.postLaunch({ id: vm.template.id })
@ -86,6 +87,9 @@ function atLaunchTemplateCtrl (
$state.go('workflowResults', { id: data.workflow_job }, { reload: true });
});
} else {
launchData.data.defaults = {
extra_vars: wfjtData.data.extra_vars
};
const promptData = {
launchConf: launchData.data,
launchOptions: launchOptions.data,