aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/inventoryApp/src/handlers
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2023-12-19 17:13:25 +0530
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2023-12-19 17:13:25 +0530
commitc5b8756512cb6dfbb0093514af7924cb3e78699b (patch)
tree7202621ea816d666bbce482b420ef574280a1c0a /sdnr/wt/odlux/apps/inventoryApp/src/handlers
parentdfd91573b7567e1dab482f17111ab8f809553d99 (diff)
Delete wt/odlux directory
New directory for odlux is sdnr/wt-odlux Issue-ID: CCSDK-3971 Change-Id: Ia0f8ba38d913a3d3bcde999b871794c65d5e575e Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/apps/inventoryApp/src/handlers')
-rw-r--r--sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryAppRootHandler.ts53
-rw-r--r--sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryDeviceListActionHandler.ts56
-rw-r--r--sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.ts36
-rw-r--r--sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryTreeHandler.ts68
-rw-r--r--sdnr/wt/odlux/apps/inventoryApp/src/handlers/panelHandler.ts11
5 files changed, 0 insertions, 224 deletions
diff --git a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryAppRootHandler.ts b/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryAppRootHandler.ts
deleted file mode 100644
index b1a0c581f..000000000
--- a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryAppRootHandler.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-* ============LICENSE_START========================================================================
-* ONAP : ccsdk feature sdnr wt odlux
-* =================================================================================================
-* Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
-* =================================================================================================
-* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
-* in compliance with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software distributed under the License
-* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-* or implied. See the License for the specific language governing permissions and limitations under
-* the License.
-* ============LICENSE_END==========================================================================
-*/
-// main state handler
-
-import { combineActionHandler } from '../../../../framework/src/flux/middleware';
-// ** do not remove **
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
-
-import { PanelId } from '../models/panelId';
-import { IInventoryDeviceListState, inventoryDeviceListActionHandler } from './inventoryDeviceListActionHandler';
-import { IInventoryElementsState, inventoryElementsActionHandler } from './inventoryElementsHandler';
-import { IInvenroryTree, inventoryTreeHandler } from './inventoryTreeHandler';
-import { currentOpenPanelHandler } from './panelHandler';
-
-export interface IInventoryAppStateState {
- inventoryTree: IInvenroryTree;
- currentOpenPanel: PanelId;
- inventoryElements: IInventoryElementsState;
- inventoryDeviceList: IInventoryDeviceListState;
-}
-
-declare module '../../../../framework/src/store/applicationStore' {
- interface IApplicationStoreState {
- inventory: IInventoryAppStateState;
- }
-}
-
-const actionHandlers = {
- inventoryTree: inventoryTreeHandler,
- currentOpenPanel: currentOpenPanelHandler,
- inventoryElements: inventoryElementsActionHandler,
- inventoryDeviceList: inventoryDeviceListActionHandler,
-};
-
-export const inventoryAppRootHandler = combineActionHandler<IInventoryAppStateState>(actionHandlers);
-export default inventoryAppRootHandler;
-
diff --git a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryDeviceListActionHandler.ts b/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryDeviceListActionHandler.ts
deleted file mode 100644
index 7c06cad99..000000000
--- a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryDeviceListActionHandler.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END==========================================================================
- */
-import { IActionHandler } from '../../../../framework/src/flux/action';
-
-import { AllInventoryDeviceListLoadedAction, LoadAllInventoryDeviceListAction } from '../actions/inventoryDeviceListActions';
-import { InventoryDeviceListType } from '../models/inventoryDeviceListType';
-
-export interface IInventoryDeviceListState {
- inventoryDeviceList: InventoryDeviceListType[];
- busy: boolean;
-}
-
-const inventoryDeviceListListStateInit: IInventoryDeviceListState = {
- inventoryDeviceList: [],
- busy: false,
-};
-
-export const inventoryDeviceListActionHandler: IActionHandler<IInventoryDeviceListState> = (state = inventoryDeviceListListStateInit, action) => {
- if (action instanceof LoadAllInventoryDeviceListAction) {
-
- state = {
- ...state,
- busy: true,
- };
-
- } else if (action instanceof AllInventoryDeviceListLoadedAction) {
- if (!action.error && action.inventoryDeviceList) {
- state = {
- ...state,
- inventoryDeviceList: action.inventoryDeviceList,
- busy: false,
- };
- } else {
- state = {
- ...state,
- busy: false,
- };
- }
- }
- return state;
-}; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.ts b/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.ts
deleted file mode 100644
index 7bac8f632..000000000
--- a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryElementsHandler.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END==========================================================================
- */
-import { createExternal, IExternalTableState } from '../../../../framework/src/components/material-table/utilities';
-import { createSearchDataHandler } from '../../../../framework/src/utilities/elasticSearch';
-
-import { InventoryType } from '../models/inventory';
-
-export interface IInventoryElementsState extends IExternalTableState<InventoryType> { }
-
-// create eleactic search material data fetch handler
-const inventoryElementsSearchHandler = createSearchDataHandler<InventoryType>('inventory');
-
-export const {
- actionHandler: inventoryElementsActionHandler,
- createActions: createInventoryElementsActions,
- createProperties: createInventoryElementsProperties,
- reloadAction: inventoryElementsReloadAction,
-
- // set value action, to change a value
-} = createExternal<InventoryType>(inventoryElementsSearchHandler, appState => appState.inventory.inventoryElements);
-
diff --git a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryTreeHandler.ts b/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryTreeHandler.ts
deleted file mode 100644
index fe90d9820..000000000
--- a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/inventoryTreeHandler.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END==========================================================================
- */
-
-import { IActionHandler } from '../../../../framework/src/flux/action';
-
-import { SetBusyAction, SetSearchTextAction, UpdateExpandedNodesAction, UpdateInventoryTreeAction, UpdateSelectedNodeAction } from '../actions/inventoryTreeActions';
-import { InventoryTreeNode, InventoryType, TreeDemoItem } from '../models/inventory';
-
-
-export interface IInvenroryTree {
- isBusy: boolean;
- rootNodes: TreeDemoItem[];
- selectedNode?: InventoryType;
- expandedItems: TreeDemoItem[];
- searchTerm: string;
-}
-
-const initialState: IInvenroryTree = {
- isBusy: false,
- rootNodes: [],
- searchTerm: '',
- selectedNode: undefined,
- expandedItems: [],
-};
-
-
-const getTreeDataFromInvetoryTreeNode = (node: InventoryTreeNode): TreeDemoItem[] => Object.keys(node).reduce<TreeDemoItem[]>((acc, key) => {
- const cur = node[key];
- acc.push({
- isMatch: cur.isMatch,
- content: cur.label || key,
- value: key,
- children: cur.children && getTreeDataFromInvetoryTreeNode(cur.children),
- });
- return acc;
-}, []);
-
-export const inventoryTreeHandler: IActionHandler<IInvenroryTree> = (state = initialState, action) => {
- if (action instanceof SetBusyAction) {
- state = { ...state, isBusy: action.busy };
- } else if (action instanceof SetSearchTextAction) {
- state = { ...state, searchTerm: action.searchTerm };
- } else if (action instanceof UpdateInventoryTreeAction) {
- const rootNodes = getTreeDataFromInvetoryTreeNode(action.rootNode);
- state = { ...state, rootNodes: rootNodes, expandedItems: [], selectedNode: undefined };
- } else if (action instanceof UpdateSelectedNodeAction) {
- state = { ...state, selectedNode: action.selectedNode };
- } else if (action instanceof UpdateExpandedNodesAction) {
- state = { ...state, expandedItems: action.expandedNodes || [] };
- }
-
- return state;
-}; \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/panelHandler.ts b/sdnr/wt/odlux/apps/inventoryApp/src/handlers/panelHandler.ts
deleted file mode 100644
index 7912d0ea5..000000000
--- a/sdnr/wt/odlux/apps/inventoryApp/src/handlers/panelHandler.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { IActionHandler } from '../../../../framework/src/flux/action';
-
-import { SetPanelAction } from '../actions/panelActions';
-import { PanelId } from '../models/panelId';
-
-export const currentOpenPanelHandler: IActionHandler<PanelId> = (state = null, action) => {
- if (action instanceof SetPanelAction) {
- state = action.panelId;
- }
- return state;
-}; \ No newline at end of file