Fixed page reload on settings change

This commit is contained in:
Ildar Kamalov
2019-01-23 17:22:04 +03:00
committed by Eugene Bujak
parent 6e41897323
commit 24be7ce4ed
5 changed files with 62 additions and 35 deletions

View File

@@ -308,11 +308,21 @@ const dhcp = handleActions({
const newState = { ...state, config: newConfig, processingDhcp: false };
return newState;
},
[actions.setDhcpConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setDhcpConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setDhcpConfigSuccess]: (state, { payload }) => {
const { config } = state;
const newConfig = { ...config, ...payload };
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
}, {
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
config: {
enabled: false,
},