|
|
|
@ -1,9 +1,12 @@ |
|
|
|
|
import { Value } from 'slate'; |
|
|
|
|
import { RawTimeRange, TimeRange } from '@grafana/ui'; |
|
|
|
|
|
|
|
|
|
import { DataQuery } from './series'; |
|
|
|
|
import { RawTimeRange } from '@grafana/ui'; |
|
|
|
|
import TableModel from 'app/core/table_model'; |
|
|
|
|
import { Emitter } from 'app/core/core'; |
|
|
|
|
import { LogsModel } from 'app/core/logs_model'; |
|
|
|
|
import TableModel from 'app/core/table_model'; |
|
|
|
|
import { DataSourceSelectItem } from 'app/types/datasources'; |
|
|
|
|
|
|
|
|
|
import { DataQuery } from './series'; |
|
|
|
|
|
|
|
|
|
export interface CompletionItem { |
|
|
|
|
/** |
|
|
|
@ -80,6 +83,52 @@ export enum ExploreId { |
|
|
|
|
right = 'right', |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export interface ExploreState { |
|
|
|
|
split: boolean; |
|
|
|
|
left: ExploreItemState; |
|
|
|
|
right: ExploreItemState; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export interface ExploreItemState { |
|
|
|
|
StartPage?: any; |
|
|
|
|
containerWidth: number; |
|
|
|
|
datasourceInstance: any; |
|
|
|
|
datasourceError: string; |
|
|
|
|
datasourceLoading: boolean | null; |
|
|
|
|
datasourceMissing: boolean; |
|
|
|
|
eventBridge?: Emitter; |
|
|
|
|
exploreDatasources: DataSourceSelectItem[]; |
|
|
|
|
graphResult?: any[]; |
|
|
|
|
history: HistoryItem[]; |
|
|
|
|
initialDatasource?: string; |
|
|
|
|
initialQueries: DataQuery[]; |
|
|
|
|
initialized: boolean; |
|
|
|
|
logsHighlighterExpressions?: string[]; |
|
|
|
|
logsResult?: LogsModel; |
|
|
|
|
modifiedQueries: DataQuery[]; |
|
|
|
|
queryIntervals: QueryIntervals; |
|
|
|
|
queryTransactions: QueryTransaction[]; |
|
|
|
|
requestedDatasourceId?: number; |
|
|
|
|
range: TimeRange | RawTimeRange; |
|
|
|
|
scanner?: RangeScanner; |
|
|
|
|
scanning?: boolean; |
|
|
|
|
scanRange?: RawTimeRange; |
|
|
|
|
showingGraph: boolean; |
|
|
|
|
showingLogs: boolean; |
|
|
|
|
showingStartPage?: boolean; |
|
|
|
|
showingTable: boolean; |
|
|
|
|
supportsGraph: boolean | null; |
|
|
|
|
supportsLogs: boolean | null; |
|
|
|
|
supportsTable: boolean | null; |
|
|
|
|
tableResult?: TableModel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export interface ExploreUrlState { |
|
|
|
|
datasource: string; |
|
|
|
|
queries: any[]; // Should be a DataQuery, but we're going to strip refIds, so typing makes less sense
|
|
|
|
|
range: RawTimeRange; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export interface HistoryItem { |
|
|
|
|
ts: number; |
|
|
|
|
query: DataQuery; |
|
|
|
@ -168,31 +217,4 @@ export interface TextMatch { |
|
|
|
|
end: number; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export interface ExploreState { |
|
|
|
|
StartPage?: any; |
|
|
|
|
datasource: any; |
|
|
|
|
datasourceError: any; |
|
|
|
|
graphResult?: any[]; |
|
|
|
|
history: HistoryItem[]; |
|
|
|
|
logsHighlighterExpressions?: string[]; |
|
|
|
|
logsResult?: LogsModel; |
|
|
|
|
queryTransactions: QueryTransaction[]; |
|
|
|
|
scanning?: boolean; |
|
|
|
|
scanRange?: RawTimeRange; |
|
|
|
|
showingGraph: boolean; |
|
|
|
|
showingLogs: boolean; |
|
|
|
|
showingStartPage?: boolean; |
|
|
|
|
showingTable: boolean; |
|
|
|
|
supportsGraph: boolean | null; |
|
|
|
|
supportsLogs: boolean | null; |
|
|
|
|
supportsTable: boolean | null; |
|
|
|
|
tableResult?: TableModel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export interface ExploreUrlState { |
|
|
|
|
datasource: string; |
|
|
|
|
queries: any[]; // Should be a DataQuery, but we're going to strip refIds, so typing makes less sense
|
|
|
|
|
range: RawTimeRange; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type ResultType = 'Graph' | 'Logs' | 'Table'; |
|
|
|
|