mirror of
https://github.com/ansible/awx.git
synced 2026-05-25 01:27:45 -02:30
restructure 'if's in LaunchPrompt
This commit is contained in:
@@ -29,16 +29,6 @@ function LaunchPrompt({ config, resource, onLaunch, onCancel, i18n }) {
|
||||
|
||||
// TODO: Add Credential Passwords step
|
||||
|
||||
if (
|
||||
config.ask_job_type_on_launch ||
|
||||
config.ask_limit_on_launch ||
|
||||
config.ask_verbosity_on_launch ||
|
||||
config.ask_tags_on_launch ||
|
||||
config.ask_skip_tags_on_launch ||
|
||||
config.ask_variables_on_launch ||
|
||||
config.ask_scm_branch_on_launch ||
|
||||
config.ask_diff_mode_on_launch
|
||||
) {
|
||||
if (config.ask_job_type_on_launch) {
|
||||
initialValues.job_type = resource.job_type || '';
|
||||
}
|
||||
@@ -63,6 +53,16 @@ function LaunchPrompt({ config, resource, onLaunch, onCancel, i18n }) {
|
||||
if (config.ask_diff_mode_on_launch) {
|
||||
initialValues.diff_mode = resource.diff_mode || false;
|
||||
}
|
||||
if (
|
||||
config.ask_job_type_on_launch ||
|
||||
config.ask_limit_on_launch ||
|
||||
config.ask_verbosity_on_launch ||
|
||||
config.ask_tags_on_launch ||
|
||||
config.ask_skip_tags_on_launch ||
|
||||
config.ask_variables_on_launch ||
|
||||
config.ask_scm_branch_on_launch ||
|
||||
config.ask_diff_mode_on_launch
|
||||
) {
|
||||
steps.push({
|
||||
name: i18n._(t`Other Prompts`),
|
||||
component: <OtherPromptsStep config={config} />,
|
||||
|
||||
Reference in New Issue
Block a user