mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Expressions: Fixes the issue showing expressions editor (#62510)
* Use suggested value for uid * update the snapshot * use __expr__ * replace all -100 with __expr__ * update snapshot * more changes * revert redundant change * Use expr.DatasourceUID where it's possible * generate files
This commit is contained in:
@@ -171,7 +171,7 @@ func migrateAlertRuleQueries(data []alertQuery) ([]alertQuery, error) {
|
||||
result := make([]alertQuery, 0, len(data))
|
||||
for _, d := range data {
|
||||
// queries that are expression are not relevant, skip them.
|
||||
if d.DatasourceUID == expr.OldDatasourceUID {
|
||||
if d.DatasourceUID == expr.DatasourceType {
|
||||
result = append(result, d)
|
||||
continue
|
||||
}
|
||||
|
@@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/expr"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
)
|
||||
|
||||
@@ -187,7 +188,7 @@ func transConditions(set dashAlertSettings, orgID int64, dsUIDMap dsUIDLookup) (
|
||||
ccAlertQuery := alertQuery{
|
||||
RefID: ccRefID,
|
||||
Model: exprModelJSON,
|
||||
DatasourceUID: "-100",
|
||||
DatasourceUID: expr.DatasourceUID,
|
||||
}
|
||||
|
||||
newCond.Data = append(newCond.Data, ccAlertQuery)
|
||||
|
Reference in New Issue
Block a user