From 42a4bad0f0ee5690ae42b85b5db7a9759a59b51a Mon Sep 17 00:00:00 2001 From: Gilles De Mey Date: Wed, 30 Aug 2023 13:02:23 +0200 Subject: [PATCH] Alerting: Do not show grouping when grouplabels are empty in email template (#74090) --- emails/templates/partials/alerting/grouping_labels.mjml | 4 ++-- public/emails/ng_alert_notification.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emails/templates/partials/alerting/grouping_labels.mjml b/emails/templates/partials/alerting/grouping_labels.mjml index 629351abbb0..51a78147d9c 100644 --- a/emails/templates/partials/alerting/grouping_labels.mjml +++ b/emails/templates/partials/alerting/grouping_labels.mjml @@ -8,9 +8,9 @@

📁 {{ .GroupLabels.grafana_folder }} › {{ .GroupLabels.alertname }}

- {{ else }} + {{ else if gt (len .GroupLabels.SortedPairs) 0 }} - +

📁 Grouped by  diff --git a/public/emails/ng_alert_notification.html b/public/emails/ng_alert_notification.html index 6945666e5eb..43fabdb6787 100644 --- a/public/emails/ng_alert_notification.html +++ b/public/emails/ng_alert_notification.html @@ -193,7 +193,7 @@ - {{ else }} + {{ else if gt (len .GroupLabels.SortedPairs) 0 }}