Added remove remote mount

This commit is contained in:
2019-10-06 19:05:25 -05:00
parent 82fad7b706
commit aff7e8cb3a
10 changed files with 173 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ import * as Constants from '../../constants';
import {createReducer} from 'redux-starter-kit';
import {
DISPLAY_CONFIGURATION,
removeRemoteMount3,
RESET_MOUNTS_STATE,
SET_ALLOW_MOUNT,
setAutoMountProcessed,
@@ -62,6 +63,16 @@ export const createMountReducer = state => {
DisplayRemoteConfiguration: action.payload.remote,
};
},
[removeRemoteMount3]: (state, action) => {
let providerState = {...state.ProviderState};
delete providerState[action.payload];
const remoteMounts = state.RemoteMounts.filter(i => i !== action.payload);
return {
...state,
ProviderState: providerState,
RemoteMounts: remoteMounts,
};
},
[RESET_MOUNTS_STATE]: (state, action) => {
return {
...state,