mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
* add .TemplateData property to data in order to populate template <title> tags with the compiled subject value * update all templates * re-enable integration test and update implementation to check changes * chore: fmt * add HiddenSubject template func and update text templates * slight performance improvement, only execute subject template once * update template I missed --------- Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
39 lines
940 B
Plaintext
39 lines
940 B
Plaintext
[[HiddenSubject .Subject "[[.Title]]"]]
|
|
|
|
[[.Title]]
|
|
----------------
|
|
|
|
[[ .Alerts | len ]] alert[[ if gt (len .Alerts) 1 ]]s[[ end ]] for
|
|
[[ range .GroupLabels.SortedPairs ]]
|
|
[[ .Name ]] = [[ .Value ]]
|
|
[[ end ]]
|
|
[[ if gt (len .Alerts.Firing) 0 ]]([[ .Alerts.Firing | len ]]) Firing[[ end ]]
|
|
[[ range .Alerts.Firing ]]
|
|
Labels:
|
|
[[ range .Labels.SortedPairs ]]
|
|
[[ .Name ]] = [[ .Value ]]
|
|
[[ end ]]
|
|
[[ if gt (len .Annotations) 0 ]]
|
|
Annotations:
|
|
[[ end ]]
|
|
[[ range .Annotations.SortedPairs ]]
|
|
[[ .Name ]] = [[ .Value ]]
|
|
[[ end ]]
|
|
[[ end ]][[ if gt (len .Alerts.Resolved) 0 ]]([[ .Alerts.Resolved | len ]]) Resolved[[ end ]]
|
|
[[ range .Alerts.Resolved ]]
|
|
Labels:
|
|
[[ range .Labels.SortedPairs ]]
|
|
[[ .Name ]] = [[ .Value ]]
|
|
[[ end ]]
|
|
[[ if gt (len .Annotations) 0 ]]
|
|
Annotations:
|
|
[[ end ]]
|
|
[[ range .Annotations.SortedPairs ]]
|
|
[[ .Name ]] = [[ .Value ]]
|
|
[[ end ]]
|
|
[[ end ]]View your Alert rule:
|
|
[[.RuleUrl]]
|
|
|
|
Go to the Alerts page:
|
|
[[.AlertPageUrl]]
|