mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
With live tailing introduced in Explore we now have a lot of actions dispatching and the Redux Dev Tools doesn't cope with the amount and rate of actions and crashes. This PR turns on redux action logging when you add logActions=true in the url and turns it off if you refresh the page or add logActions=false in the url.
18 lines
489 B
TypeScript
18 lines
489 B
TypeScript
import { ApplicationState } from 'app/types/application';
|
|
import { reducerFactory } from 'app/core/redux';
|
|
import { toggleLogActions } from '../actions/application';
|
|
|
|
export const initialState: ApplicationState = {
|
|
logActions: false,
|
|
};
|
|
|
|
export const applicationReducer = reducerFactory<ApplicationState>(initialState)
|
|
.addMapper({
|
|
filter: toggleLogActions,
|
|
mapper: (state): ApplicationState => ({
|
|
...state,
|
|
logActions: !state.logActions,
|
|
}),
|
|
})
|
|
.create();
|