mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
influxdb: check for invalid program-flow (#37474)
This commit is contained in:
@@ -182,10 +182,12 @@ export default class InfluxDatasource extends DataSourceWithBackend<InfluxQuery,
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only applied on flux queries
|
||||
*/
|
||||
applyTemplateVariables(query: InfluxQuery, scopedVars: ScopedVars): Record<string, any> {
|
||||
// this only works in flux-mode, it should not be called in non-flux-mode
|
||||
if (!this.isFlux) {
|
||||
throw new Error('applyTemplateVariables called in influxql-mode. this should never happen');
|
||||
}
|
||||
|
||||
return {
|
||||
...query,
|
||||
query: this.templateSrv.replace(query.query ?? '', scopedVars), // The raw query text
|
||||
|
Reference in New Issue
Block a user