aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx
diff options
context:
space:
mode:
authorMichael Dürre <michael.duerre@highstreet-technologies.com>2022-09-08 09:45:06 +0200
committerMichael Dürre <michael.duerre@highstreet-technologies.com>2022-09-08 09:46:47 +0200
commita2b6dd34d73bf432846dc59c6f57dd59a03aff9b (patch)
tree35658e382769bc7575f87d0e9580d6ee98230eb2 /sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx
parent6f9c3d2cea04a2af7a73d8df1de87d584b277552 (diff)
update odlux sources
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>
Diffstat (limited to 'sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx')
-rw-r--r--sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx33
1 files changed, 3 insertions, 30 deletions
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