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