api/ds/query: simplify data sources lookup for queries and expressions (#41172)

This commit is contained in:
Ryan McKinley
2021-11-05 08:12:55 -07:00
committed by GitHub
parent c8b7373016
commit 3489721ed6
16 changed files with 255 additions and 224 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ func (aq *AlertQuery) setModelProps() error {
// IsExpression returns true if the alert query is an expression.
func (aq *AlertQuery) IsExpression() (bool, error) {
return aq.DatasourceUID == expr.DatasourceUID, nil
return expr.IsDataSource(aq.DatasourceUID), nil
}
// setMaxDatapoints sets the model maxDataPoints if it's missing or invalid