From b1cb4cb10f74be294fd234459e864cbf2762bae0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 20 Apr 2023 23:58:24 +0200 Subject: check-health: use $FormatLine --- check-health.rsc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check-health.rsc b/check-health.rsc index e208bac..af0d70b 100644 --- a/check-health.rsc +++ b/check-health.rsc @@ -21,6 +21,7 @@ :global CheckHealthVoltagePercent; :global Identity; +:global FormatLine; :global IfThenElse; :global LogPrintExit2; :global ScriptLock; @@ -93,8 +94,8 @@ $ScriptLock $0; subject=([ $SymbolForNotification ("high-voltage-sign,chart-" . [ $IfThenElse ($NumLast < \ $NumCurr) "in" "de" ] . "creasing") ] . "Health warning: " . $Name); \ message=("The " . $Name . " on " . $Identity . " jumped more than " . $CheckHealthVoltagePercent . "%.\n\n" . \ - "old value: " . ($CheckHealthLast->$Name) . " V\n" . \ - "new value: " . $Value . " V") }); + [ $FormatLine "old value" ($CheckHealthLast->$Name . " V") ] . "\n" . \ + [ $FormatLine "new value" ($Value . " V") ]) }); } else={ :if ($NumCurr <= $CheckHealthVoltageLow && $NumLast > $CheckHealthVoltageLow) do={ $SendNotification2 ({ origin=$0; \ -- cgit v1.2.3-54-g00ecf