+ {this.getToggleFilteringButton()}
{refreshFullButton}
@@ -97,9 +111,10 @@ Dashboard.propTypes = {
getStats: PropTypes.func,
getStatsHistory: PropTypes.func,
getTopStats: PropTypes.func,
- disableDns: PropTypes.func,
dashboard: PropTypes.object,
isCoreRunning: PropTypes.bool,
+ getFiltering: PropTypes.func,
+ toggleFiltering: PropTypes.func,
};
export default Dashboard;
diff --git a/client/src/reducers/index.js b/client/src/reducers/index.js
index 3372cf79..aec84a8d 100644
--- a/client/src/reducers/index.js
+++ b/client/src/reducers/index.js
@@ -129,6 +129,18 @@ const dashboard = handleActions({
return state;
},
+
+ [actions.getFilteringRequest]: state => ({ ...state, processingFiltering: true }),
+ [actions.getFilteringFailure]: state => ({ ...state, processingFiltering: false }),
+ [actions.getFilteringSuccess]: (state, { payload }) => {
+ const newState = { ...state, isFilteringEnabled: payload, processingFiltering: false };
+ return newState;
+ },
+
+ [actions.toggleFilteringSuccess]: (state) => {
+ const newSetting = { ...state, isFilteringEnabled: !state.isFilteringEnabled };
+ return newSetting;
+ },
}, {
processing: true,
isCoreRunning: false,
@@ -136,6 +148,7 @@ const dashboard = handleActions({
processingStats: true,
logStatusProcessing: false,
processingVersion: true,
+ processingFiltering: true,
});
const queryLogs = handleActions({