Postgres: For template queries return [] and not error (#38060)

* Postgres: For template queries return [] and not error

* remove the console error

* update mssql and mysql

Co-authored-by: Ying WANG <ying.wang@grafana.com>
This commit is contained in:
Ivana Huckova
2021-08-19 07:43:41 -04:00
committed by GitHub
parent ecfa32c8cb
commit 7f8576ee37
7 changed files with 19 additions and 7 deletions

View File

@ -1,6 +1,6 @@
import { map as _map } from 'lodash';
import { lastValueFrom } from 'rxjs';
import { map } from 'rxjs/operators';
import { lastValueFrom, of } from 'rxjs';
import { map, catchError } from 'rxjs/operators';
import { BackendDataSourceResponse, DataSourceWithBackend, FetchResponse, getBackendSrv } from '@grafana/runtime';
import { AnnotationEvent, DataSourceInstanceSettings, MetricFindValue, ScopedVars } from '@grafana/data';
@ -159,6 +159,9 @@ export class PostgresDatasource extends DataSourceWithBackend<PostgresQuery, Pos
.pipe(
map((rsp) => {
return this.responseParser.transformMetricFindResponse(rsp);
}),
catchError((err) => {
return of([]);
})
)
);