mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove deprecated DataSourceAPI methods (#49313)
* Remove deprecated metods * Update docs
This commit is contained in:
parent
12c25759da
commit
2d48e75e88
@ -8,7 +8,6 @@ import { AnnotationEvent, AnnotationQuery, AnnotationSupport } from './annotatio
|
|||||||
import { CoreApp } from './app';
|
import { CoreApp } from './app';
|
||||||
import { KeyValue, LoadingState, TableData, TimeSeries } from './data';
|
import { KeyValue, LoadingState, TableData, TimeSeries } from './data';
|
||||||
import { DataFrame, DataFrameDTO } from './dataFrame';
|
import { DataFrame, DataFrameDTO } from './dataFrame';
|
||||||
import { LogRowModel } from './logs';
|
|
||||||
import { PanelData } from './panel';
|
import { PanelData } from './panel';
|
||||||
import { GrafanaPlugin, PluginMeta } from './plugin';
|
import { GrafanaPlugin, PluginMeta } from './plugin';
|
||||||
import { DataQuery } from './query';
|
import { DataQuery } from './query';
|
||||||
@ -266,29 +265,6 @@ abstract class DataSourceApi<
|
|||||||
*/
|
*/
|
||||||
getQueryDisplayText?(query: TQuery): string;
|
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.
|
* Variable query action.
|
||||||
*/
|
*/
|
||||||
|
@ -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 {
|
export interface DataSourceWithLogsContextSupport {
|
||||||
/**
|
/**
|
||||||
@ -157,12 +158,12 @@ export interface DataSourceWithLogsContextSupport {
|
|||||||
options?: TContextQueryOptions
|
options?: TContextQueryOptions
|
||||||
) => Promise<DataQueryResponse>;
|
) => 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;
|
showContextToggle(row?: LogRowModel): boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @alpha
|
|
||||||
*/
|
|
||||||
export const hasLogsContextSupport = (datasource: any): datasource is DataSourceWithLogsContextSupport => {
|
export const hasLogsContextSupport = (datasource: any): datasource is DataSourceWithLogsContextSupport => {
|
||||||
if (!datasource) {
|
if (!datasource) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user