mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Small readability improvements to template.go (#63422)
* Alerting: Small readability improvements to template.go * Fix lint
This commit is contained in:
@@ -142,7 +142,7 @@ func (rs *ruleStates) expandRuleLabelsAndAnnotations(ctx context.Context, log lo
|
||||
expand := func(original map[string]string) map[string]string {
|
||||
expanded := make(map[string]string, len(original))
|
||||
for k, v := range original {
|
||||
ev, err := template.Expand(ctx, alertRule.Title, v, templateLabels, alertInstance, externalURL)
|
||||
ev, err := template.Expand(ctx, alertRule.Title, v, template.NewData(templateLabels, alertInstance), externalURL, alertInstance.EvaluatedAt)
|
||||
expanded[k] = ev
|
||||
if err != nil {
|
||||
log.Error("Error in expanding template", "name", k, "value", v, "error", err)
|
||||
|
||||
Reference in New Issue
Block a user