AlertingNG: rename Condition properties to match front end (#32267)

This commit is contained in:
Kyle Brandt
2021-03-24 08:07:29 -04:00
committed by GitHub
parent 9a7c10cffe
commit 05fa9d6ad9
6 changed files with 46 additions and 43 deletions
+3 -3
View File
@@ -110,8 +110,8 @@ func GetQueryDataRequest(ctx AlertExecCtx, c *models.Condition, now time.Time) (
Queries: []backend.DataQuery{},
}
for i := range c.QueriesAndExpressions {
q := c.QueriesAndExpressions[i]
for i := range c.Data {
q := c.Data[i]
model, err := q.GetModel()
if err != nil {
return nil, fmt.Errorf("failed to get query model: %w", err)
@@ -157,7 +157,7 @@ func execute(ctx AlertExecCtx, c *models.Condition, now time.Time, dataService *
}
for refID, res := range pbRes.Responses {
if refID != c.RefID {
if refID != c.Condition {
continue
}
result.Results = res.Frames