diff --git a/packages/grafana-runtime/src/utils/DataSourceWithBackend.ts b/packages/grafana-runtime/src/utils/DataSourceWithBackend.ts index 9761f75ac50..4499892b266 100644 --- a/packages/grafana-runtime/src/utils/DataSourceWithBackend.ts +++ b/packages/grafana-runtime/src/utils/DataSourceWithBackend.ts @@ -44,7 +44,7 @@ export class DataSourceWithBackend< throw new Error('Unknown Datasource: ' + q.datasource); } return { - ...q, + ...this.applyTemplateVariables(q), datasourceId: ds.id, intervalMs, maxDataPoints, @@ -70,6 +70,13 @@ export class DataSourceWithBackend< return from(req); } + /** + * Override to apply template variables + */ + applyTemplateVariables(query: DataQuery) { + return query; + } + /** * This makes the arrow library loading async. */