mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 16:57:14 -06:00
Query: do not require datasource name and id (#24718)
This commit is contained in:
parent
6a0abf895e
commit
b73d237bf8
@ -32,10 +32,7 @@ func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDto dtos.MetricReq
|
||||
expr := false
|
||||
var ds *models.DataSource
|
||||
for i, query := range reqDto.Queries {
|
||||
name, err := query.Get("datasource").String()
|
||||
if err != nil {
|
||||
return Error(500, "datasource missing name", err)
|
||||
}
|
||||
name := query.Get("datasource").MustString("")
|
||||
if name == "__expr__" {
|
||||
expr = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user