Chore: reduces circular dependencies for variables/utils.ts (#44087)

* Chore: move constants to own file

* Chore: moves safe* functions to grafana/data

* Chore: moves safe* functions to grafana/data

* Chore: adds VariableQueryEditorProps and deprecates VariableQueryProps

* Chore: remove getDefaultVariableAdapters function

* Chore: moves transaction status to types

* Chore: fix tests that do not initialise TemplateSrv

* Chore: change space when stringifying

* Chore: revert safe* func move

* Chore: remove circular dependency in Explore utils
This commit is contained in:
Hugo Häggmark
2022-01-17 12:48:26 +01:00
committed by GitHub
parent aa00af8f2d
commit 4b4afc7b2c
42 changed files with 136 additions and 142 deletions

View File

@@ -4,17 +4,16 @@ import {
DataFrame,
DataQuery,
DataQueryRequest,
DataQueryResponse,
DataSourceApi,
EventBusExtended,
HistoryItem,
LogsModel,
PanelData,
QueryHint,
RawTimeRange,
TimeRange,
EventBusExtended,
DataQueryResponse,
} from '@grafana/data';
import { ExploreGraphStyle } from 'app/core/utils/explore';
export enum ExploreId {
left = 'left',
@@ -59,6 +58,9 @@ export interface ExploreState {
richHistoryLimitExceededWarningShown: boolean;
}
export const EXPLORE_GRAPH_STYLES = ['lines', 'bars', 'points', 'stacked_lines', 'stacked_bars'] as const;
export type ExploreGraphStyle = typeof EXPLORE_GRAPH_STYLES[number];
export interface ExploreItemState {
/**
* Width used for calculating the graph interval (can't have more datapoints than pixels)

View File

@@ -1,4 +1,4 @@
import { PluginError, PluginMeta, PanelPlugin } from '@grafana/data';
import { PanelPlugin, PluginError, PluginMeta } from '@grafana/data';
import { TemplateSrv } from '@grafana/runtime';
export interface PluginDashboard {
@@ -32,6 +32,9 @@ export interface PluginsState {
panels: PanelPluginsIndex;
}
/**
* @deprecated use VariableQueryEditorProps instead
*/
export interface VariableQueryProps {
query: any;
onChange: (query: any, definition: string) => void;