DataSourceWithBackend: apply template variables (#22558)

This commit is contained in:
Ryan McKinley
2020-03-03 22:27:58 -08:00
committed by GitHub
parent ee5fcc03df
commit 5166073f98
@@ -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.
*/