mirror of
https://github.com/grafana/grafana.git
synced 2024-12-25 08:21:46 -06:00
Alerting: Fix newlines in text/plain template (#70207)
Alerting: Fix newlines in text/plain template at last
This commit is contained in:
parent
9ed09257fe
commit
a773b722b1
@ -7,7 +7,7 @@ You have [[ len .Alerts.Firing ]] firing alert(s), and [[ len .Alerts.Resolved ]
|
||||
[[ template "__default_alerts_summarize" .Alerts.Firing ]]
|
||||
[[- end ]]
|
||||
|
||||
[[ if .Alerts.Resolved -]]
|
||||
[[- if .Alerts.Resolved ]]
|
||||
([[ len .Alerts.Resolved ]]) RESOLVED
|
||||
-------------
|
||||
[[ template "__default_alerts_summarize" .Alerts.Resolved ]]
|
||||
@ -51,12 +51,12 @@ Annotations: [[ template "__default_sorted_pairs" $annotations ]]
|
||||
|
||||
[[- define "__default_sorted_pairs" -]]
|
||||
[[ range .SortedPairs ]]
|
||||
[[ .Name ]] = [[ .Value ]]
|
||||
- [[ .Name ]] = [[ .Value ]]
|
||||
[[- end ]]
|
||||
[[- end -]]
|
||||
|
||||
[[- if .Message -]]
|
||||
[[ .Message ]]
|
||||
[[ else -]]
|
||||
[[- else -]]
|
||||
[[ template "__default_message" . ]]
|
||||
[[- end ]]
|
||||
|
@ -7,7 +7,7 @@ You have {{ len .Alerts.Firing }} firing alert(s), and {{ len .Alerts.Resolved }
|
||||
{{ template "__default_alerts_summarize" .Alerts.Firing }}
|
||||
{{- end }}
|
||||
|
||||
{{ if .Alerts.Resolved -}}
|
||||
{{- if .Alerts.Resolved }}
|
||||
({{ len .Alerts.Resolved }}) RESOLVED
|
||||
-------------
|
||||
{{ template "__default_alerts_summarize" .Alerts.Resolved }}
|
||||
@ -51,13 +51,13 @@ Annotations: {{ template "__default_sorted_pairs" $annotations }}
|
||||
|
||||
{{- define "__default_sorted_pairs" -}}
|
||||
{{ range .SortedPairs }}
|
||||
{{ .Name }} = {{ .Value }}
|
||||
- {{ .Name }} = {{ .Value }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if .Message -}}
|
||||
{{ .Message }}
|
||||
{{ else -}}
|
||||
{{- else -}}
|
||||
{{ template "__default_message" . }}
|
||||
{{- end }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user