diff options
author | 2021-02-18 10:55:11 +0100 | |
---|---|---|
committer | 2021-02-18 10:55:11 +0100 | |
commit | f333557c8bf0a74eb7b88d6294dea2a420b1ec61 (patch) | |
tree | 696dabd7e02e97f53ff936e54543a31944696c3d /sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts | |
parent | 5cf15b27796b68b3edbfc1e59f258dee1e10b2b9 (diff) |
Update NetworkMap and LinkCalculator
Update NetworkMap and LinkCalculator to use the topology-server-v2 API, minior bugfixes for NetworkMap
Issue-ID: CCSDK-3172
Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Change-Id: Ia5690c5039d7a9431443bc131fe398cc79d08287
Diffstat (limited to 'sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts')
-rw-r--r-- | sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts index f573009bd..67e10e629 100644 --- a/sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts +++ b/sdnr/wt/odlux/apps/networkMapApp/src/handlers/detailsReducer.ts @@ -18,15 +18,15 @@ import { IActionHandler } from '../../../../framework/src/flux/action'; import { link } from "../model/link"; -import { site, Device } from "../model/site"; +import { Site, Device } from "../model/site"; import { HistoryEntry } from "../model/historyEntry"; -import { SelectSiteAction, SelectLinkAction, AddToHistoryAction, ClearHistoryAction, IsBusyCheckingDeviceListAction, FinishedLoadingDeviceListAction, ClearLoadedDevicesAction, ClearDetailsAction } from '../actions/detailsAction'; +import { SelectSiteAction, SelectLinkAction, AddToHistoryAction, ClearHistoryAction, IsBusyCheckingDeviceListAction, FinishedLoadingDeviceListAction, ClearLoadedDevicesAction, ClearDetailsAction, InitializeLoadedDevicesAction } from '../actions/detailsAction'; export type DetailsStoreState={ - data: site | link | null, + data: Site | link | null, history: HistoryEntry[], isBusyCheckingDeviceList: boolean, - checkedDevices: Device[] | null + checkedDevices: Device[] } @@ -34,7 +34,7 @@ const initialState: DetailsStoreState = { data: null, history:[], isBusyCheckingDeviceList: false, - checkedDevices: null + checkedDevices: [] } export const DetailsReducer:IActionHandler<DetailsStoreState>=(state = initialState, action)=>{ @@ -59,8 +59,10 @@ export const DetailsReducer:IActionHandler<DetailsStoreState>=(state = initialSt state = Object.assign({}, state, {checkedDevices: action.devices}); }else if(action instanceof ClearLoadedDevicesAction){ - state = Object.assign({}, state, {checkedDevices: null}); + state = Object.assign({}, state, {checkedDevices: []}); + }else if(action instanceof InitializeLoadedDevicesAction){ + state = Object.assign({}, state, {checkedDevices: action.devices}); } |