diff options
Diffstat (limited to 'sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts')
-rw-r--r-- | sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts index 7214705e1..8ab82f2e9 100644 --- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts +++ b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/connectivityReducer.ts @@ -17,12 +17,12 @@ */ import { IActionHandler } from "../../../../framework/src/flux/action"; -import { IsTopologyServerReachableAction, IsTileServerReachableAction } from "../actions/connectivityAction"; +import { IsTopologyServerReachableAction, IsTileServerReachableAction, IsBusycheckingConnectivityAction } from "../actions/connectivityAction"; -export type connectivityState = {isToplogyServerAvailable: boolean, isTileServerAvailable: boolean }; +export type connectivityState = {isToplogyServerAvailable: boolean, isTileServerAvailable: boolean, isBusy: boolean }; -const initialState: connectivityState = {isToplogyServerAvailable: true, isTileServerAvailable: true}; +const initialState: connectivityState = {isToplogyServerAvailable: true, isTileServerAvailable: true, isBusy: true}; export const ConnectivityReducer: IActionHandler<connectivityState> =(state=initialState, action)=> { @@ -32,6 +32,9 @@ export const ConnectivityReducer: IActionHandler<connectivityState> =(state=init else if (action instanceof IsTileServerReachableAction){ state = Object.assign({}, state, { isTileServerAvailable: action.reachable }); + }else if(action instanceof IsBusycheckingConnectivityAction){ + state = {...state, isBusy: action.isBusy} + } return state; |