Skip to content

Commit

Permalink
notification(mail): escape linebreak
Browse files Browse the repository at this point in the history
Moving the first line to a newline makes it clearer to see what the
default value should look like. Using the escape after the opening
triple quotes, makes it so that a blank line isn't printed above the
default value content.

Change-Id: I33ae266800d00a592dbeb09ae71cb4031f719606
  • Loading branch information
logan-connolly committed Jan 10, 2025
1 parent 9e8957b commit 69cc86a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmk/gui/wato/_notification_parameter/_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def _elements_ascii(is_cse: bool) -> Mapping[str, DictElement[Any]]:
parameter_form=MultilineText(
title=Title("Body head for both host and service notifications"),
prefill=DefaultValue(
"""Host: $HOSTNAME$
"""\
Host: $HOSTNAME$
Alias: $HOSTALIAS$
Address: $HOSTADDRESS$
"""
Expand All @@ -117,7 +118,8 @@ def _elements_ascii(is_cse: bool) -> Mapping[str, DictElement[Any]]:
parameter_form=MultilineText(
title=Title("Body tail for host notifications"),
prefill=DefaultValue(
"""Event: $EVENT_TXT$
"""\
Event: $EVENT_TXT$
Output: $HOSTOUTPUT$
Perfdata: $HOSTPERFDATA$
$LONGHOSTOUTPUT$
Expand All @@ -130,7 +132,8 @@ def _elements_ascii(is_cse: bool) -> Mapping[str, DictElement[Any]]:
parameter_form=MultilineText(
title=Title("Body tail for service notifications"),
prefill=DefaultValue(
"""Service: $SERVICEDESC$
"""\
Service: $SERVICEDESC$
Event: $EVENT_TXT$
Output: $SERVICEOUTPUT$
Perfdata: $SERVICEPERFDATA$
Expand Down

0 comments on commit 69cc86a

Please sign in to comment.