diff --git a/frontend/app/components/BugFinder/SessionList/SessionList.js b/frontend/app/components/BugFinder/SessionList/SessionList.js index 46a200192..de9a718f1 100644 --- a/frontend/app/components/BugFinder/SessionList/SessionList.js +++ b/frontend/app/components/BugFinder/SessionList/SessionList.js @@ -10,7 +10,7 @@ import AnimatedSVG, { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; // const ALL = 'all'; const PER_PAGE = 10; -const AUTOREFRESH_INTERVAL = 3 * 60 * 1000; +const AUTOREFRESH_INTERVAL = 2 * 60 * 1000; var timeoutId; @connect(state => ({ diff --git a/frontend/app/duck/search.js b/frontend/app/duck/search.js index c49b00b26..71361da14 100644 --- a/frontend/app/duck/search.js +++ b/frontend/app/duck/search.js @@ -150,6 +150,7 @@ export const reduceThenFetchResource = filter.filters = filter.filters.map(filterMap); filter.limit = 10; filter.page = getState().getIn(['search', 'currentPage']); + const forceFetch = filter.filters.length === 0; // duration filter from local storage if (!filter.filters.find((f) => f.type === FilterKey.DURATION)) { @@ -172,7 +173,7 @@ export const reduceThenFetchResource = } } - return isRoute(ERRORS_ROUTE, window.location.pathname) ? dispatch(fetchErrorsList(filter)) : dispatch(fetchSessionList(filter)); + return isRoute(ERRORS_ROUTE, window.location.pathname) ? dispatch(fetchErrorsList(filter)) : dispatch(fetchSessionList(filter, forceFetch)); }; export const edit = reduceThenFetchResource((instance) => ({ diff --git a/frontend/app/duck/sessions.js b/frontend/app/duck/sessions.js index 0d40ae9e5..e4a4ff7bd 100644 --- a/frontend/app/duck/sessions.js +++ b/frontend/app/duck/sessions.js @@ -67,8 +67,8 @@ const reducer = (state = initialState, action = {}) => { switch (action.type) { case INIT: return state.set('current', Session(action.session)); - case FETCH_LIST.REQUEST: - return action.clear ? state.set('list', List()) : state; + // case FETCH_LIST.REQUEST: + // return action.clear ? state.set('list', List()) : state; case FETCH_ERROR_STACK.SUCCESS: return state.set('errorStack', List(action.data.trace).map(ErrorStack)).set('sourcemapUploaded', action.data.sourcemapUploaded); case FETCH_LIVE_LIST.SUCCESS: @@ -224,7 +224,7 @@ function init(session) { } export const fetchList = - (params = {}, clear = false, force = false) => + (params = {}, force = false) => (dispatch, getState) => { if (!force) { // compare with the last fetched filter const oldFilters = getSessionFilter(); @@ -237,7 +237,6 @@ export const fetchList = return dispatch({ types: FETCH_LIST.toArray(), call: (client) => client.post('/sessions/search2', params), - clear, params: cleanParams(params), }); };