Initial components for encryption settings

This commit is contained in:
Ildar Kamalov
2019-01-24 18:51:50 +03:00
committed by Eugene Bujak
parent 8725c1df7a
commit 7451eb1346
14 changed files with 471 additions and 51 deletions

View File

@@ -302,6 +302,33 @@ const dhcp = handleActions({
leases: [],
});
const encryption = handleActions({
[actions.getTlsStatusRequest]: state => ({ ...state, processing: true }),
[actions.getTlsStatusFailure]: state => ({ ...state, processing: false }),
[actions.getTlsStatusSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processing: false,
};
return newState;
},
[actions.setTlsConfigRequest]: state => ({ ...state, processingConfig: true }),
[actions.setTlsConfigFailure]: state => ({ ...state, processingConfig: false }),
[actions.setTlsConfigSuccess]: (state, { payload }) => {
const newState = {
...state,
...payload,
processingConfig: false,
};
return newState;
},
}, {
processing: true,
processingConfig: false,
});
export default combineReducers({
settings,
dashboard,
@@ -309,6 +336,7 @@ export default combineReducers({
filtering,
toasts,
dhcp,
encryption,
loadingBar: loadingBarReducer,
form: formReducer,
});