diff options
author | Herbert Eiselt <herbert.eiselt@highstreet-technologies.com> | 2019-04-03 17:12:30 +0200 |
---|---|---|
committer | Herbert Eiselt <herbert.eiselt@highstreet-technologies.com> | 2019-04-03 17:13:01 +0200 |
commit | 97fa6d943c57a784a52462aaacb329ce93cf42d6 (patch) | |
tree | b5f0f2484c0a886fcade7b9bcf1d230e6f9e9501 /sdnr/wt/odlux/apps/connectApp/src/plugin.tsx | |
parent | 3d6dd098db8ec243ca716a09fc55decbdd23b726 (diff) |
SDN-R odlux configuration
Add odlux configuration app
Change-Id: Ifecd3f6e1e3060a1fd1008f1f625a70cb2475a8a
Issue-ID: SDNC-584
Signed-off-by: Herbert Eiselt <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/apps/connectApp/src/plugin.tsx')
-rw-r--r-- | sdnr/wt/odlux/apps/connectApp/src/plugin.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sdnr/wt/odlux/apps/connectApp/src/plugin.tsx b/sdnr/wt/odlux/apps/connectApp/src/plugin.tsx index 4da33e0af..c9c11820e 100644 --- a/sdnr/wt/odlux/apps/connectApp/src/plugin.tsx +++ b/sdnr/wt/odlux/apps/connectApp/src/plugin.tsx @@ -9,7 +9,8 @@ import ConnectApplication from './views/connectView'; import { addMountedNetworkElementAsyncActionCreator, - updateMountedNetworkElementAsyncActionCreator + updateMountedNetworkElementAsyncActionCreator, + loadAllMountedNetworkElementsAsync } from './actions/mountedNetworkElementsActions'; import { AddSnackbarNotification } from '../../../framework/src/actions/snackbarActions'; @@ -30,14 +31,15 @@ export function register() { menuEntry: "Connect" }); + applicationApi.applicationStoreInitialized.then(applicationStore => { applicationStore.dispatch(loadAllMountedNetworkElementsAsync); }); // subscribe to the websocket notifications - subscribe<ObjectNotification & IFormatedMessage>(["ObjectCreationNotification", "ObjectDeletionNotification","AttributeValueChangedNotification"], (msg => { - const store = applicationApi && applicationApi.applicationStore; + subscribe<ObjectNotification & IFormatedMessage>(["ObjectCreationNotification", "ObjectDeletionNotification", "AttributeValueChangedNotification"], (msg => { + const store = applicationApi.applicationStore; if (msg && msg.notifType === "ObjectCreationNotification" && store) { store.dispatch(addMountedNetworkElementAsyncActionCreator(msg.objectId)); - store.dispatch(new AddSnackbarNotification({ message: `Adding network element [${ msg.objectId }]`, options: { variant: 'info' } })); + store.dispatch(new AddSnackbarNotification({ message: `Adding network element [${msg.objectId}]`, options: { variant: 'info' } })); } else if (msg && (msg.notifType === "ObjectDeletionNotification" || msg.notifType === "AttributeValueChangedNotification") && store) { - store.dispatch(new AddSnackbarNotification({ message: `Updating network element [${ msg.objectId }]`, options: { variant: 'info' } })); + store.dispatch(new AddSnackbarNotification({ message: `Updating network element [${msg.objectId}]`, options: { variant: 'info' } })); store.dispatch(updateMountedNetworkElementAsyncActionCreator(msg.objectId)); } })); |