*: merge with master

This commit is contained in:
Andrey Meshkov
2020-02-07 15:16:46 +03:00
27 changed files with 396 additions and 284 deletions

View File

@@ -34,7 +34,21 @@ const access = handleActions(
[actions.toggleClientBlockRequest]: state => ({ ...state, processingSet: true }),
[actions.toggleClientBlockFailure]: state => ({ ...state, processingSet: false }),
[actions.toggleClientBlockSuccess]: state => ({ ...state, processingSet: false }),
[actions.toggleClientBlockSuccess]: (state, { payload }) => {
const {
allowed_clients,
disallowed_clients,
blocked_hosts,
} = payload;
const newState = {
...state,
allowed_clients: (allowed_clients && allowed_clients.join('\n')) || '',
disallowed_clients: (disallowed_clients && disallowed_clients.join('\n')) || '',
blocked_hosts: (blocked_hosts && blocked_hosts.join('\n')) || '',
processingSet: false,
};
return newState;
},
},
{
processing: true,