From 878b521a08bd9a03583424d89160c234aba85e5c Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 12 Jan 2024 13:34:36 -0500 Subject: [PATCH] Add replacements for EI1, EIM, EIA1, EIAM when there are no alarm frames. --- scripts/zmfilter.pl.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index e30e9fa82..c77ff6892 100644 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -679,7 +679,7 @@ sub substituteTags { } $rows ++; } - Debug("Frames: rows: $rows first alarm frame: $first_alarm_frame max_alarm_frame: $max_alarm_frame, score: $max_alarm_score"); + Debug("Frames: rows: $rows first alarm frame: $$first_alarm_frame{FrameId} max_alarm_frame: $$max_alarm_frame{FrameId}, score: $max_alarm_score"); } my $url = $Config{ZM_URL}; @@ -771,6 +771,10 @@ sub substituteTags { $text =~ s/%EPFM%//g; #Path to the frame view for the (first) event image with the highest score $text =~ s/%EPI1%//g; #Path to the first alarmed event image, suitable for use in img tags $text =~ s/%EPIM%//g; #Path to the (first) event image with the highest score, suitable for use in img tags + $text =~ s/%EI1%/There is no image for EI1/g; + $text =~ s/%EIM%/There is no image for EIM/g; + $text =~ s/%EI1A%/There is no image for EI1A/g; + $text =~ s/%EIMA%/There is no image for EIMA/g; } else { $text =~ s/%EPF1%/$url?view=frame&mid=$Event->{MonitorId}&eid=$Event->{Id}&fid=$first_alarm_frame->{FrameId}/g; $text =~ s/%EPFM%/$url?view=frame&mid=$Event->{MonitorId}&eid=$Event->{Id}&fid=$max_alarm_frame->{FrameId}/g;