Chore: Avoid floating point numbers for maxDataPoints (#108292)

* avoid floating point numbers

* prettier
This commit is contained in:
ismail simsek
2025-07-18 11:12:08 +02:00
committed by GitHub
parent 960b0e770b
commit 35884fa9a4
@@ -43,6 +43,7 @@ export interface ChangeSizePayload {
exploreId: string;
width: number;
}
export const changeSizeAction = createAction<ChangeSizePayload>('explore/changeSize');
/**
@@ -52,7 +53,9 @@ interface ChangePanelsState {
exploreId: string;
panelsState: ExplorePanelsState;
}
export const changePanelsStateAction = createAction<ChangePanelsState>('explore/changePanels');
export function changePanelState(
exploreId: string,
panel: PreferredVisualisationType,
@@ -83,6 +86,7 @@ interface ChangeCorrelationHelperData {
exploreId: string;
correlationEditorHelperData?: ExploreCorrelationHelperData;
}
export const changeCorrelationHelperData = createAction<ChangeCorrelationHelperData>(
'explore/changeCorrelationHelperData'
);
@@ -99,17 +103,20 @@ interface InitializeExplorePayload {
datasourceInstance?: DataSourceApi;
eventBridge: EventBusExtended;
}
const initializeExploreAction = createAction<InitializeExplorePayload>('explore/initializeExploreAction');
export interface SetUrlReplacedPayload {
exploreId: string;
}
export const setUrlReplacedAction = createAction<SetUrlReplacedPayload>('explore/setUrlReplaced');
export interface SaveCorrelationsPayload {
exploreId: string;
correlations: CorrelationData[];
}
export const saveCorrelationsAction = createAction<SaveCorrelationsPayload>('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 };
}