AlertingNG/SSE: Datasource UID and UID/ID only (drop name) (#33039)

SSE still will support ID until dashboard/frontend always requests UID
update *.http examples

Co-authored-by: gotjosh <josue@grafana.com>
This commit is contained in:
Kyle Brandt
2021-04-16 09:29:19 -04:00
committed by GitHub
parent 5d1ec39224
commit 2c862678ab
11 changed files with 40 additions and 71 deletions

View File

@@ -134,9 +134,14 @@ func (s *Service) buildGraph(req *backend.QueryDataRequest) (*simple.DirectedGra
return nil, err
}
dsUID, err := rn.GetDatasourceUid()
if err != nil {
return nil, err
}
var node graph.Node
switch dsName {
case DatasourceName:
switch {
case dsName == DatasourceName || dsUID == DatasourceUID:
node, err = buildCMDNode(dp, rn)
default: // If it's not an expression query, it's a data source query.
node, err = s.buildDSNode(dp, rn, req.PluginContext.OrgID)