+ client: handle static leases form

This commit is contained in:
Ildar Kamalov
2019-05-28 15:07:46 +03:00
committed by Simon Zolin
parent a8384c004e
commit 6f2503a09f
13 changed files with 510 additions and 245 deletions

View File

@@ -351,18 +351,49 @@ const dhcp = handleActions({
const newState = { ...state, config: newConfig, processingConfig: false };
return newState;
},
[actions.toggleLeaseModal]: (state) => {
const newState = {
...state,
isModalOpen: !state.isModalOpen,
};
return newState;
},
[actions.addStaticLeaseRequest]: state => ({ ...state, processingAdding: true }),
[actions.addStaticLeaseFailure]: state => ({ ...state, processingAdding: false }),
[actions.addStaticLeaseSuccess]: (state) => {
const newState = {
...state,
processingAdding: false,
};
return newState;
},
[actions.removeStaticLeaseRequest]: state => ({ ...state, processingDeleting: true }),
[actions.removeStaticLeaseFailure]: state => ({ ...state, processingDeleting: false }),
[actions.removeStaticLeaseSuccess]: (state) => {
const newState = {
...state,
processingDeleting: false,
};
return newState;
},
}, {
processing: true,
processingStatus: false,
processingInterfaces: false,
processingDhcp: false,
processingConfig: false,
processingAdding: false,
processingDeleting: false,
config: {
enabled: false,
},
check: null,
leases: [],
staticLeases: [],
isModalOpen: false,
});
export default combineReducers({