From 7e0e2027fcc245f208456d3b12806338a4aef9d7 Mon Sep 17 00:00:00 2001 From: Lukas Siatka Date: Thu, 4 Jun 2020 14:06:32 +0200 Subject: [PATCH] Chore: changed ExploreMode and Emitter type in ExploreStateItem --- public/app/features/explore/state/reducers.ts | 5 ++--- public/app/types/explore.ts | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/public/app/features/explore/state/reducers.ts b/public/app/features/explore/state/reducers.ts index e4e7c628991..7d596798196 100644 --- a/public/app/features/explore/state/reducers.ts +++ b/public/app/features/explore/state/reducers.ts @@ -70,7 +70,6 @@ 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', @@ -115,7 +114,7 @@ export const makeExploreItemState = (): ExploreItemState => ({ update: makeInitialUpdateState(), latency: 0, supportedModes: [], - mode: (null as unknown) as ExploreMode, + mode: null, isLive: false, isPaused: false, urlReplaced: false, @@ -124,7 +123,7 @@ export const makeExploreItemState = (): ExploreItemState => ({ graphResult: null, logsResult: null, dedupStrategy: LogsDedupStrategy.none, - eventBridge: (null as unknown) as Emitter, + eventBridge: null, }); export const createEmptyQueryResponse = (): PanelData => ({ diff --git a/public/app/types/explore.ts b/public/app/types/explore.ts index 07f4654af87..a420d63944f 100644 --- a/public/app/types/explore.ts +++ b/public/app/types/explore.ts @@ -74,7 +74,7 @@ export interface ExploreItemState { /** * Emitter to send events to the rest of Grafana. */ - eventBridge: Emitter; + eventBridge: Emitter | null; /** * List of timeseries to be shown in the Explore graph result viewer. */ @@ -165,7 +165,7 @@ export interface ExploreItemState { latency: number; supportedModes: ExploreMode[]; - mode: ExploreMode; + mode: ExploreMode | null; /** * If true, the view is in live tailing mode.