mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Hide Prompted Fields section when tags/skip tags are prompted but have no values
This commit is contained in:
@@ -158,6 +158,9 @@ function ScheduleDetail({ schedule, i18n }) {
|
|||||||
(ask_variables_on_launch || survey_enabled) &&
|
(ask_variables_on_launch || survey_enabled) &&
|
||||||
((typeof extra_data === 'string' && extra_data !== '') ||
|
((typeof extra_data === 'string' && extra_data !== '') ||
|
||||||
(typeof extra_data === 'object' && Object.keys(extra_data).length > 0));
|
(typeof extra_data === 'object' && Object.keys(extra_data).length > 0));
|
||||||
|
const showTagsDetail = ask_tags_on_launch && job_tags && job_tags.length > 0;
|
||||||
|
const showSkipTagsDetail =
|
||||||
|
ask_skip_tags_on_launch && skip_tags && skip_tags.length > 0;
|
||||||
|
|
||||||
const showPromptedFields =
|
const showPromptedFields =
|
||||||
showCredentialsDetail ||
|
showCredentialsDetail ||
|
||||||
@@ -166,8 +169,8 @@ function ScheduleDetail({ schedule, i18n }) {
|
|||||||
ask_job_type_on_launch ||
|
ask_job_type_on_launch ||
|
||||||
ask_limit_on_launch ||
|
ask_limit_on_launch ||
|
||||||
ask_scm_branch_on_launch ||
|
ask_scm_branch_on_launch ||
|
||||||
ask_skip_tags_on_launch ||
|
showSkipTagsDetail ||
|
||||||
ask_tags_on_launch ||
|
showTagsDetail ||
|
||||||
ask_verbosity_on_launch ||
|
ask_verbosity_on_launch ||
|
||||||
showVariablesDetail;
|
showVariablesDetail;
|
||||||
|
|
||||||
@@ -266,7 +269,7 @@ function ScheduleDetail({ schedule, i18n }) {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{ask_tags_on_launch && job_tags && job_tags.length > 0 && (
|
{showTagsDetail && (
|
||||||
<Detail
|
<Detail
|
||||||
fullWidth
|
fullWidth
|
||||||
label={i18n._(t`Job Tags`)}
|
label={i18n._(t`Job Tags`)}
|
||||||
@@ -284,7 +287,7 @@ function ScheduleDetail({ schedule, i18n }) {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{ask_skip_tags_on_launch && skip_tags && skip_tags.length > 0 && (
|
{showSkipTagsDetail && (
|
||||||
<Detail
|
<Detail
|
||||||
fullWidth
|
fullWidth
|
||||||
label={i18n._(t`Skip Tags`)}
|
label={i18n._(t`Skip Tags`)}
|
||||||
|
|||||||
Reference in New Issue
Block a user