Alerting: Set Dashboard and Panel IDs on rule group replacement (#60374)

* Set Dashboard and Panel IDs on rule group replacement

* fix comments and abbreviate test variable name

* Update pkg/services/ngalert/provisioning/alert_rules.go

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
This commit is contained in:
Alex Moreno
2022-12-16 11:47:25 +01:00
committed by GitHub
co-authored by Jean-Philippe Quéméner
parent 689f30623a
commit 174c61b949
5 changed files with 111 additions and 7 deletions
@@ -108,7 +108,7 @@ func validateRuleNode(
newAlertRule.Annotations = ruleNode.ApiRuleNode.Annotations
newAlertRule.Labels = ruleNode.ApiRuleNode.Labels
err = newAlertRule.SetDashboardAndPanel()
err = newAlertRule.SetDashboardAndPanelFromAnnotations()
if err != nil {
return nil, err
}