Skip to content

Commit

Permalink
notifications: fix empty space being shown in stage 2 recap
Browse files Browse the repository at this point in the history
Change-Id: Ibb15fa76470ce940270cab2cc77fbbac3a974d0e
  • Loading branch information
loocars committed Jan 9, 2025
1 parent a8c0e8b commit 9234b93
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion cmk/gui/wato/pages/notifications/quick_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,19 @@ def _get_condition_choices() -> dict[str, ConditionGroup]:
return choices


def custom_recap_formspec_filter_for_hosts_and_services(
quick_setup_id: QuickSetupId,
stage_index: StageIndex,
all_stages_form_data: ParsedFormData,
) -> Sequence[Widget]:
cleaned_stages_form_data = {
form_spec_wrapper_id: form_data
for form_spec_wrapper_id, form_data in all_stages_form_data.items()
if len(form_data) > 0
}
return recaps.recaps_form_spec(quick_setup_id, stage_index, cleaned_stages_form_data)


def filter_for_hosts_and_services() -> QuickSetupStage:
def _components() -> Sequence[Widget]:
return [
Expand Down Expand Up @@ -805,7 +818,7 @@ def _components() -> Sequence[Widget]:
QuickSetupStageAction(
id=ActionId("action"),
custom_validators=[],
recap=[recaps.recaps_form_spec],
recap=[custom_recap_formspec_filter_for_hosts_and_services],
next_button_label=_("Next step: Notification method (plug-in)"),
)
],
Expand Down

0 comments on commit 9234b93

Please sign in to comment.