From a2b6dd34d73bf432846dc59c6f57dd59a03aff9b Mon Sep 17 00:00:00 2001
From: Michael Dürre <michael.duerre@highstreet-technologies.com>
Date: Thu, 8 Sep 2022 09:45:06 +0200
Subject: update odlux sources
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

update basic odlux functionality for kohn

Issue-ID: CCSDK-3765
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Change-Id: I3723c9c2f35b9012ba537920b294a54bb556cbc6
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
---
 .../wt/odlux/apps/connectApp/src/pluginConnect.tsx | 33 ++--------------------
 1 file changed, 3 insertions(+), 30 deletions(-)

(limited to 'sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx')

diff --git a/sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx b/sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx
index 83763485b..2a9a46d2b 100644
--- a/sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx
+++ b/sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx
@@ -27,13 +27,12 @@ import { IApplicationStoreState } from "../../../framework/src/store/application
 import connect, { Connect, IDispatcher } from '../../../framework/src/flux/connect';
 
 import { findWebUrisForGuiCutThroughAsyncAction, updateCurrentViewAsyncAction, SetPanelAction } from './actions/commonNetworkElementsActions';
-import { refreshConnectionStatusCountAsyncAction } from './actions/connectionStatusCountActions';
 import { createNetworkElementsActions, createNetworkElementsProperties, networkElementsReloadAction } from './handlers/networkElementsHandler';
 import connectAppRootHandler from './handlers/connectAppRootHandler';
 import ConnectApplication from './views/connectView';
 import { PanelId } from "./models/panelId";
 import { NetworkElementsList } from './components/networkElements';
-import DashboardHome from "./components/dashboardHome";
+
 
 let currentStatus: string | undefined = undefined;
 let refreshInterval: ReturnType<typeof window.setInterval> | null = null;
@@ -84,7 +83,6 @@ export function register() {
     icon: faPlug,
     rootComponent: App,
     rootActionHandler: connectAppRootHandler,
-    dashbaordElement: DashboardHome,
     menuEntry: "Connect"
   });
 
@@ -92,9 +90,9 @@ export function register() {
   subscribe<IFormatedMessage>(["object-creation-notification", "object-deletion-notification", "attribute-value-changed-notification"], (msg => {
     const store = applicationApi.applicationStore;
     if (msg && msg.type.type === "object-creation-notification" && store) {
-      store.dispatch(new AddSnackbarNotification({ message: `Adding network element [${msg.data['object-id-ref']}]`, options: { variant: 'info' } }));
+      store.dispatch(new AddSnackbarNotification({ message: `Adding node [${msg.data['object-id-ref']}]`, options: { variant: 'info' } }));
     } else if (msg && (msg.type.type === "object-deletion-notification" || msg.type.type === "attribute-value-changed-notification") && store) {
-      store.dispatch(new AddSnackbarNotification({ message: `Updating network element [${msg.data['object-id-ref']}]`, options: { variant: 'info' } }));
+      store.dispatch(new AddSnackbarNotification({ message: `Updating node [${msg.data['object-id-ref']}]`, options: { variant: 'info' } }));
     }
     if (store) {
       store.dispatch(updateCurrentViewAsyncAction() as any).then(() => {
@@ -109,29 +107,4 @@ export function register() {
     store.dispatch(networkElementsReloadAction);
   });
 
-  applicationApi.applicationStoreInitialized.then(store => {
-    store.dispatch(refreshConnectionStatusCountAsyncAction);
-  });
-
-
-  applicationApi.loginEvent.addHandler(e=>{
-    refreshInterval = startRefreshInterval() as any;
-  })
-
-  applicationApi.logoutEvent.addHandler(e=>{
-
-    applicationApi.applicationStoreInitialized.then(store => {
-      clearInterval(refreshInterval!);
-    });
-  })
-
-  const startRefreshInterval =() =>{
-    const refresh = window.setInterval(() => {
-      applicationApi.applicationStoreInitialized.then(store => {
-        store.dispatch(refreshConnectionStatusCountAsyncAction);
-      });
-    }, 15000);
-
-    return refresh;
-  }
 }
\ No newline at end of file
-- 
cgit 1.2.3-korg

