mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 01:08:48 -03:30
Merge pull request #1914 from mabashian/1901-wfjt-prompt-vars
Fix aggregation of extra vars on wfjt launch preview
This commit is contained in:
@@ -73,12 +73,13 @@ function atLaunchTemplateCtrl (
|
|||||||
} else if (vm.template.type === 'workflow_job_template') {
|
} else if (vm.template.type === 'workflow_job_template') {
|
||||||
const selectedWorkflowJobTemplate = workflowTemplate.create();
|
const selectedWorkflowJobTemplate = workflowTemplate.create();
|
||||||
const preLaunchPromises = [
|
const preLaunchPromises = [
|
||||||
|
selectedWorkflowJobTemplate.request('get', vm.template.id),
|
||||||
selectedWorkflowJobTemplate.getLaunch(vm.template.id),
|
selectedWorkflowJobTemplate.getLaunch(vm.template.id),
|
||||||
selectedWorkflowJobTemplate.optionsLaunch(vm.template.id),
|
selectedWorkflowJobTemplate.optionsLaunch(vm.template.id),
|
||||||
];
|
];
|
||||||
|
|
||||||
Promise.all(preLaunchPromises)
|
Promise.all(preLaunchPromises)
|
||||||
.then(([launchData, launchOptions]) => {
|
.then(([wfjtData, launchData, launchOptions]) => {
|
||||||
if (selectedWorkflowJobTemplate.canLaunchWithoutPrompt()) {
|
if (selectedWorkflowJobTemplate.canLaunchWithoutPrompt()) {
|
||||||
selectedWorkflowJobTemplate
|
selectedWorkflowJobTemplate
|
||||||
.postLaunch({ id: vm.template.id })
|
.postLaunch({ id: vm.template.id })
|
||||||
@@ -86,6 +87,9 @@ function atLaunchTemplateCtrl (
|
|||||||
$state.go('workflowResults', { id: data.workflow_job }, { reload: true });
|
$state.go('workflowResults', { id: data.workflow_job }, { reload: true });
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
launchData.data.defaults = {
|
||||||
|
extra_vars: wfjtData.data.extra_vars
|
||||||
|
};
|
||||||
const promptData = {
|
const promptData = {
|
||||||
launchConf: launchData.data,
|
launchConf: launchData.data,
|
||||||
launchOptions: launchOptions.data,
|
launchOptions: launchOptions.data,
|
||||||
|
|||||||
Reference in New Issue
Block a user