alerting
alerting copied to clipboard
Remove unused if in `default_template.go`
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
I strongly suggest splitting the template into multiple lines, just like regular code:
{{- define "default.message" -}}
{{- if gt (len .Alerts.Firing) 0 -}}
**Firing**
{{- template "__text_alert_list" .Alerts.Firing -}}
{{- end -}}
{{- if gt (len .Alerts.Resolved) 0 -}}
**Resolved**
{{- template "__text_alert_list" .Alerts.Resolved -}}
{{- end -}}
{{- end -}}
MEMO: Same also in {{- define "teams.default.message" -}} block.