mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* creating types, actions, reducer * load teams and store in redux * delete team * set search query action and tests * Teampages page * team members, bug in fetching team * flattened team state, tests for TeamMembers * test for team member selector * team settings * actions for group sync * tests for team groups * removed comment * remove old stores * fix: formating of datasource.go * fix: minor changes to imports * adding debounce and fixing issue in teamlist * refactoring: moving types to their own files
26 lines
888 B
TypeScript
26 lines
888 B
TypeScript
import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
|
|
import thunk from 'redux-thunk';
|
|
import { createLogger } from 'redux-logger';
|
|
import sharedReducers from 'app/core/reducers';
|
|
import alertingReducers from 'app/features/alerting/state/reducers';
|
|
import teamsReducers from 'app/features/teams/state/reducers';
|
|
|
|
const rootReducer = combineReducers({
|
|
...sharedReducers,
|
|
...alertingReducers,
|
|
...teamsReducers,
|
|
});
|
|
|
|
export let store;
|
|
|
|
export function configureStore() {
|
|
const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
// DEV builds we had the logger middleware
|
|
store = createStore(rootReducer, {}, composeEnhancers(applyMiddleware(thunk, createLogger())));
|
|
} else {
|
|
store = createStore(rootReducer, {}, composeEnhancers(applyMiddleware(thunk)));
|
|
}
|
|
}
|