diff --git a/public/app/features/explore/state/explorePane.ts b/public/app/features/explore/state/explorePane.ts index 9835b9f3e09..c9fc652279f 100644 --- a/public/app/features/explore/state/explorePane.ts +++ b/public/app/features/explore/state/explorePane.ts @@ -43,6 +43,7 @@ export interface ChangeSizePayload { exploreId: string; width: number; } + export const changeSizeAction = createAction('explore/changeSize'); /** @@ -52,7 +53,9 @@ interface ChangePanelsState { exploreId: string; panelsState: ExplorePanelsState; } + export const changePanelsStateAction = createAction('explore/changePanels'); + export function changePanelState( exploreId: string, panel: PreferredVisualisationType, @@ -83,6 +86,7 @@ interface ChangeCorrelationHelperData { exploreId: string; correlationEditorHelperData?: ExploreCorrelationHelperData; } + export const changeCorrelationHelperData = createAction( 'explore/changeCorrelationHelperData' ); @@ -99,17 +103,20 @@ interface InitializeExplorePayload { datasourceInstance?: DataSourceApi; eventBridge: EventBusExtended; } + const initializeExploreAction = createAction('explore/initializeExploreAction'); export interface SetUrlReplacedPayload { exploreId: string; } + export const setUrlReplacedAction = createAction('explore/setUrlReplaced'); export interface SaveCorrelationsPayload { exploreId: string; correlations: CorrelationData[]; } + export const saveCorrelationsAction = createAction('explore/saveCorrelationsAction'); /** @@ -130,6 +137,7 @@ export interface InitializeExploreOptions { position?: number; eventBridge: EventBusExtended; } + /** * Initialize Explore state with state from the URL and the React component. * Call this only on components for with the Explore state has not been initialized. @@ -214,7 +222,7 @@ export const paneReducer = (state: ExploreItemState = makeExplorePaneState(), ac state = timeReducer(state, action); if (changeSizeAction.match(action)) { - const containerWidth = action.payload.width; + const containerWidth = Math.floor(action.payload.width); return { ...state, containerWidth }; }