MSSQL: Fixes issue with hidden queries still being executed (#35837)

This commit is contained in:
Torkel Ödegaard 2021-06-17 10:13:57 +02:00 committed by GitHub
parent 16a0e7b6a4
commit 5f07381796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -111,6 +111,10 @@ export class MssqlDatasource extends DataSourceWithBackend<MssqlQuery, MssqlOpti
.toPromise();
}
filterQuery(query: MssqlQuery): boolean {
return !query.hide;
}
metricFindQuery(query: string, optionalOptions: any): Promise<MetricFindValue[]> {
let refId = 'tempvar';
if (optionalOptions && optionalOptions.variable && optionalOptions.variable.name) {

View File

@ -71,10 +71,7 @@ export class MysqlDatasource extends DataSourceWithBackend<MySQLQuery, MySQLOpti
}
filterQuery(query: MySQLQuery): boolean {
if (query.hide) {
return false;
}
return true;
return !query.hide;
}
applyTemplateVariables(target: MySQLQuery, scopedVars: ScopedVars): Record<string, any> {