Alerting: Do not show grouping when grouplabels are empty in email template (#74090)

This commit is contained in:
Gilles De Mey 2023-08-30 13:02:23 +02:00 committed by GitHub
parent 29ea0886e3
commit 42a4bad0f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -8,9 +8,9 @@
<h2>📁 {{ .GroupLabels.grafana_folder }} &rsaquo; {{ .GroupLabels.alertname }}</h2> <h2>📁 {{ .GroupLabels.grafana_folder }} &rsaquo; {{ .GroupLabels.alertname }}</h2>
</mj-text> </mj-text>
<mj-raw> <mj-raw>
{{ else }} {{ else if gt (len .GroupLabels.SortedPairs) 0 }}
</mj-raw> </mj-raw>
<!-- non-default grouping labels are just printed verbatim --> <!-- non-default grouping labels are just printed verbatim, if we are grouping at all -->
<mj-text padding="0" align="left"> <mj-text padding="0" align="left">
<h2> <h2>
📁 Grouped by&nbsp; 📁 Grouped by&nbsp;

View File

@ -193,7 +193,7 @@
</div> </div>
</td> </td>
</tr> </tr>
{{ else }} {{ else if gt (len .GroupLabels.SortedPairs) 0 }}
<tr> <tr>
<td align="left" class="txt" style="font-size:0px;padding:0;word-break:break-word;"> <td align="left" class="txt" style="font-size:0px;padding:0;word-break:break-word;">
<div style="font-family: Inter, Helvetica, Arial; font-size: 13px; line-height: 150%; text-align: left; color: #000000;"> <div style="font-family: Inter, Helvetica, Arial; font-size: 13px; line-height: 150%; text-align: left; color: #000000;">