Chore: updates initial ExploreItemState in Explore reducer

This commit is contained in:
Lukas Siatka
2020-06-02 15:24:10 +02:00
parent c28c45f4d9
commit 6ecc4e83e7
@@ -12,6 +12,7 @@ import {
TimeZone,
toLegacyResponseData,
ExploreMode,
LogsDedupStrategy,
} from '@grafana/data';
import { RefreshPicker } from '@grafana/ui';
import { LocationUpdate } from '@grafana/runtime';
@@ -69,6 +70,7 @@ import {
} from './actionTypes';
import { ResultProcessor } from '../utils/ResultProcessor';
import { updateLocation } from '../../../core/actions';
import { Emitter } from 'app/core/core';
export const DEFAULT_RANGE = {
from: 'now-6h',
@@ -105,7 +107,6 @@ export const makeExploreItemState = (): ExploreItemState => ({
to: null,
},
scanning: false,
scanRange: null,
showingGraph: true,
showingTable: true,
loading: false,
@@ -114,11 +115,16 @@ export const makeExploreItemState = (): ExploreItemState => ({
update: makeInitialUpdateState(),
latency: 0,
supportedModes: [],
mode: null,
mode: (null as unknown) as ExploreMode,
isLive: false,
isPaused: false,
urlReplaced: false,
queryResponse: createEmptyQueryResponse(),
tableResult: null,
graphResult: null,
logsResult: null,
dedupStrategy: LogsDedupStrategy.none,
eventBridge: (null as unknown) as Emitter,
});
export const createEmptyQueryResponse = (): PanelData => ({