|
@@ -133,6 +133,14 @@ export class PanelQueryRunner {
|
|
|
? (datasource as DataSourceApi)
|
|
? (datasource as DataSourceApi)
|
|
|
: await getDatasourceSrv().get(datasource as string, request.scopedVars);
|
|
: await getDatasourceSrv().get(datasource as string, request.scopedVars);
|
|
|
|
|
|
|
|
|
|
+ // Attach the datasource name to each query
|
|
|
|
|
+ request.targets = request.targets.map(query => {
|
|
|
|
|
+ if (!query.datasource) {
|
|
|
|
|
+ query.datasource = ds.name;
|
|
|
|
|
+ }
|
|
|
|
|
+ return query;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
const lowerIntervalLimit = minInterval ? templateSrv.replace(minInterval, request.scopedVars) : ds.interval;
|
|
const lowerIntervalLimit = minInterval ? templateSrv.replace(minInterval, request.scopedVars) : ds.interval;
|
|
|
const norm = kbn.calculateInterval(timeRange, widthPixels, lowerIntervalLimit);
|
|
const norm = kbn.calculateInterval(timeRange, widthPixels, lowerIntervalLimit);
|
|
|
|
|
|