⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.82
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
grafana
/
public
/
app
/
store
/
View File Name :
configureStore.ts
import { configureStore as reduxConfigureStore, createListenerMiddleware } from '@reduxjs/toolkit'; import { setupListeners } from '@reduxjs/toolkit/query'; import { browseDashboardsAPI } from 'app/features/browse-dashboards/api/browseDashboardsAPI'; import { publicDashboardApi } from 'app/features/dashboard/api/publicDashboardApi'; import { StoreState } from 'app/types/store'; import { buildInitialState } from '../core/reducers/navModel'; import { addReducer, createRootReducer } from '../core/reducers/root'; import { alertingApi } from '../features/alerting/unified/api/alertingApi'; import { setStore } from './store'; export function addRootReducer(reducers: any) { // this is ok now because we add reducers before configureStore is called // in the future if we want to add reducers during runtime // we'll have to solve this in a more dynamic way addReducer(reducers); } const listenerMiddleware = createListenerMiddleware(); export function configureStore(initialState?: Partial
) { const store = reduxConfigureStore({ reducer: createRootReducer(), middleware: (getDefaultMiddleware) => getDefaultMiddleware({ thunk: true, serializableCheck: false, immutableCheck: false }).concat( listenerMiddleware.middleware, alertingApi.middleware, publicDashboardApi.middleware, browseDashboardsAPI.middleware ), devTools: process.env.NODE_ENV !== 'production', preloadedState: { navIndex: buildInitialState(), ...initialState, }, }); // this enables "refetchOnFocus" and "refetchOnReconnect" for RTK Query setupListeners(store.dispatch); setStore(store); return store; } export type RootState = ReturnType
['getState']>; export type AppDispatch = ReturnType
['dispatch']; /* function getActionsToIgnoreSerializableCheckOn() { return [ 'dashboard/setPanelAngularComponent', 'dashboard/panelModelAndPluginReady', 'dashboard/dashboardInitCompleted', 'plugins/panelPluginLoaded', 'explore/initializeExplore', 'explore/changeRange', 'explore/updateDatasourceInstance', 'explore/queryStoreSubscription', 'explore/queryStreamUpdated', ]; } function getPathsToIgnoreMutationAndSerializableCheckOn() { return [ 'plugins.panels', 'dashboard.panels', 'dashboard.getModel', 'payload.plugin', 'panelEditorNew.getPanel', 'panelEditorNew.getSourcePanel', 'panelEditorNew.getData', 'explore.left.queryResponse', 'explore.right.queryResponse', 'explore.left.datasourceInstance', 'explore.right.datasourceInstance', 'explore.left.range', 'explore.left.eventBridge', 'explore.right.eventBridge', 'explore.right.range', 'explore.left.querySubscription', 'explore.right.querySubscription', ]; } */