mirror of
https://github.com/grafana/grafana.git
synced 2025-09-21 05:23:24 +08:00
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:
@ -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([]);
|
||||
})
|
||||
)
|
||||
);
|
||||
|
Reference in New Issue
Block a user