Chore: Remove deprecated DataSourceAPI methods (#49313)

* Remove deprecated metods

* Update docs
This commit is contained in:
Piotr Jamróz 2022-05-23 08:26:33 +02:00 committed by GitHub
parent 12c25759da
commit 2d48e75e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 28 deletions

View File

@ -8,7 +8,6 @@ import { AnnotationEvent, AnnotationQuery, AnnotationSupport } from './annotatio
import { CoreApp } from './app';
import { KeyValue, LoadingState, TableData, TimeSeries } from './data';
import { DataFrame, DataFrameDTO } from './dataFrame';
import { LogRowModel } from './logs';
import { PanelData } from './panel';
import { GrafanaPlugin, PluginMeta } from './plugin';
import { DataQuery } from './query';
@ -266,29 +265,6 @@ abstract class DataSourceApi<
*/
getQueryDisplayText?(query: TQuery): string;
/**
* @deprecated getLogRowContext and showContextToggle in `DataSourceApi` is deprecated.
*
* DataSourceWithLogsContextSupport should be implemented instead (these methods have exactly
* the same signature in DataSourceWithLogsContextSupport).
* This method will be removed from DataSourceApi in the future. Some editors may still show
* a deprecation warning which can be ignored for time being.
*/
getLogRowContext?: <TContextQueryOptions extends {}>(
row: LogRowModel,
options?: TContextQueryOptions
) => Promise<DataQueryResponse>;
/**
* @deprecated getLogRowContext and showContextToggle in `DataSourceApi` is deprecated.
*
* DataSourceWithLogsContextSupport should be implemented instead (these methods have exactly
* the same signature in DataSourceWithLogsContextSupport).
* This method will be removed from DataSourceApi in the future. Some editors may still show
* a deprecation warning which can be ignored for time being.
*/
showContextToggle?(row?: LogRowModel): boolean;
/**
* Variable query action.
*/

View File

@ -146,7 +146,8 @@ export enum LogsDedupDescription {
}
/**
* @alpha
* Data sources that allow showing context rows around the provided LowRowModel should implement this method.
* This will enable "context" button in Logs Panel.
*/
export interface DataSourceWithLogsContextSupport {
/**
@ -157,12 +158,12 @@ export interface DataSourceWithLogsContextSupport {
options?: TContextQueryOptions
) => Promise<DataQueryResponse>;
/**
* This method can be used to show "context" button based on runtime conditions (for example row model data or plugin settings, etc.)
*/
showContextToggle(row?: LogRowModel): boolean;
}
/**
* @alpha
*/
export const hasLogsContextSupport = (datasource: any): datasource is DataSourceWithLogsContextSupport => {
if (!datasource) {
return false;