mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Moves PromContext from query level to DataQueryRequest level (#21260)
Closes #19598 Fixes bug introduced recently where the new PromQueryEditor did not preserve the PromContext.Explore set on the query model by PromQueryField which caused the table to be empty for Prometheus in explore.
This commit is contained in:
@@ -3,6 +3,11 @@ import { KeyValue } from './data';
|
||||
import { NavModel } from './navModel';
|
||||
import { PluginMeta, GrafanaPlugin, PluginIncludeType } from './plugin';
|
||||
|
||||
export enum CoreApp {
|
||||
Dashboard = 'dashboard',
|
||||
Explore = 'explore',
|
||||
}
|
||||
|
||||
export interface AppRootProps<T = KeyValue> {
|
||||
meta: AppPluginMeta<T>;
|
||||
|
||||
|
@@ -7,6 +7,7 @@ import { AnnotationEvent, KeyValue, LoadingState, TableData, TimeSeries } from '
|
||||
import { DataFrame, DataFrameDTO } from './dataFrame';
|
||||
import { RawTimeRange, TimeRange, AbsoluteTimeRange } from './time';
|
||||
import { ScopedVars } from './ScopedVars';
|
||||
import { CoreApp } from './app';
|
||||
|
||||
export interface DataSourcePluginOptionsEditorProps<JSONData = DataSourceJsonData, SecureJSONData = {}> {
|
||||
options: DataSourceSettings<JSONData, SecureJSONData>;
|
||||
@@ -449,6 +450,7 @@ export interface DataQueryRequest<TQuery extends DataQuery = DataQuery> {
|
||||
scopedVars: ScopedVars;
|
||||
targets: TQuery[];
|
||||
timezone: string;
|
||||
app: CoreApp | string;
|
||||
|
||||
cacheTimeout?: string;
|
||||
exploreMode?: 'Logs' | 'Metrics';
|
||||
|
Reference in New Issue
Block a user