use DataSourceWithBackend instead of DataSourceApi (#34194)

This commit is contained in:
Erik Sundell
2021-05-18 16:39:27 +02:00
committed by GitHub
parent ff112f07e3
commit f3a989d117

View File

@@ -15,14 +15,13 @@ import {
takeWhile,
tap,
} from 'rxjs/operators';
import { getBackendSrv, getGrafanaLiveSrv, toDataQueryResponse } from '@grafana/runtime';
import { getBackendSrv, getGrafanaLiveSrv, toDataQueryResponse, DataSourceWithBackend } from '@grafana/runtime';
import { RowContextOptions } from '@grafana/ui/src/components/Logs/LogRowContextProvider';
import {
DataFrame,
DataQueryErrorType,
DataQueryRequest,
DataQueryResponse,
DataSourceApi,
DataSourceInstanceSettings,
dateMath,
LiveChannelEvent,
@@ -88,7 +87,7 @@ const displayCustomError = (title: string, message: string) =>
export const MAX_ATTEMPTS = 5;
export class CloudWatchDatasource extends DataSourceApi<CloudWatchQuery, CloudWatchJsonData> {
export class CloudWatchDatasource extends DataSourceWithBackend<CloudWatchQuery, CloudWatchJsonData> {
proxyUrl: any;
defaultRegion: any;
datasourceName: string;