From c5b8756512cb6dfbb0093514af7924cb3e78699b Mon Sep 17 00:00:00 2001 From: Ravi Pendurty Date: Tue, 19 Dec 2023 17:13:25 +0530 Subject: Delete wt/odlux directory New directory for odlux is sdnr/wt-odlux Issue-ID: CCSDK-3971 Change-Id: Ia0f8ba38d913a3d3bcde999b871794c65d5e575e Signed-off-by: Ravi Pendurty --- .../src/assets/icons/eventLogAppIcon.svg | 21 ---- .../src/components/refreshEventLogDialog.tsx | 117 --------------------- .../src/handlers/eventLogAppRootHandler.ts | 45 -------- .../eventLogApp/src/handlers/eventLogHandler.tsx | 36 ------- sdnr/wt/odlux/apps/eventLogApp/src/index.html | 26 ----- .../apps/eventLogApp/src/models/eventLogType.ts | 27 ----- .../odlux/apps/eventLogApp/src/pluginEventLog.tsx | 42 -------- .../odlux/apps/eventLogApp/src/views/eventLog.tsx | 102 ------------------ 8 files changed, 416 deletions(-) delete mode 100644 sdnr/wt/odlux/apps/eventLogApp/src/assets/icons/eventLogAppIcon.svg delete mode 100644 sdnr/wt/odlux/apps/eventLogApp/src/components/refreshEventLogDialog.tsx delete mode 100644 sdnr/wt/odlux/apps/eventLogApp/src/handlers/eventLogAppRootHandler.ts delete mode 100644 sdnr/wt/odlux/apps/eventLogApp/src/handlers/eventLogHandler.tsx delete mode 100644 sdnr/wt/odlux/apps/eventLogApp/src/index.html delete mode 100644 sdnr/wt/odlux/apps/eventLogApp/src/models/eventLogType.ts delete mode 100644 sdnr/wt/odlux/apps/eventLogApp/src/pluginEventLog.tsx delete mode 100644 sdnr/wt/odlux/apps/eventLogApp/src/views/eventLog.tsx (limited to 'sdnr/wt/odlux/apps/eventLogApp/src') diff --git a/sdnr/wt/odlux/apps/eventLogApp/src/assets/icons/eventLogAppIcon.svg b/sdnr/wt/odlux/apps/eventLogApp/src/assets/icons/eventLogAppIcon.svg deleted file mode 100644 index 743167d2c..000000000 --- a/sdnr/wt/odlux/apps/eventLogApp/src/assets/icons/eventLogAppIcon.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - diff --git a/sdnr/wt/odlux/apps/eventLogApp/src/components/refreshEventLogDialog.tsx b/sdnr/wt/odlux/apps/eventLogApp/src/components/refreshEventLogDialog.tsx deleted file mode 100644 index 8b5d95173..000000000 --- a/sdnr/wt/odlux/apps/eventLogApp/src/components/refreshEventLogDialog.tsx +++ /dev/null @@ -1,117 +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 * as React from 'react'; - -import Button from '@mui/material/Button'; -import Dialog from '@mui/material/Dialog'; -import DialogActions from '@mui/material/DialogActions'; -import DialogContent from '@mui/material/DialogContent'; -import DialogContentText from '@mui/material/DialogContentText'; -import DialogTitle from '@mui/material/DialogTitle'; - -import { eventLogReloadAction } from '../handlers/eventLogHandler'; -import { IDispatcher, connect, Connect } from '../../../../framework/src/flux/connect'; - -import { EventLogType } from '../models/eventLogType'; - -export enum RefreshEventLogDialogMode { - None = "none", - RefreshEventLogTable = "RefreshEventLogTable", -} - -const mapDispatch = (dispatcher: IDispatcher) => ({ - refreshEventLog: () => dispatcher.dispatch(eventLogReloadAction) -}); - -type DialogSettings = { - dialogTitle: string, - dialogDescription: string, - applyButtonText: string, - cancelButtonText: string, - enableMountIdEditor: boolean, - enableUsernameEditor: boolean, - enableExtendedEditor: boolean, -} - -const settings: { [key: string]: DialogSettings } = { - [RefreshEventLogDialogMode.None]: { - dialogTitle: "", - dialogDescription: "", - applyButtonText: "", - cancelButtonText: "", - enableMountIdEditor: false, - enableUsernameEditor: false, - enableExtendedEditor: false, - }, - [RefreshEventLogDialogMode.RefreshEventLogTable]: { - dialogTitle: "Do you want to refresh the Event Log?", - dialogDescription: "", - applyButtonText: "Yes", - cancelButtonText: "Cancel", - enableMountIdEditor: true, - enableUsernameEditor: true, - enableExtendedEditor: true, - } -} - -type RefreshEventLogDialogComponentProps = Connect & { - mode: RefreshEventLogDialogMode; - onClose: () => void; -}; - -type RefreshEventLogDialogComponentState = EventLogType & { isNameValid: boolean, isHostSet: boolean }; - -class RefreshEventLogDialogComponent extends React.Component { - constructor(props: RefreshEventLogDialogComponentProps) { - super(props); - } - - render(): JSX.Element { - const setting = settings[this.props.mode]; - return ( - - {setting.dialogTitle} - - - {setting.dialogDescription} - - - - - - - - ); - } - - private onRefresh = () => { - this.props.refreshEventLog(); - this.props.onClose(); - }; - - private onCancel = () => { - this.props.onClose(); - } -} - -export const RefreshEventLogDialog = connect(undefined, mapDispatch)(RefreshEventLogDialogComponent); -export default RefreshEventLogDialog; \ No newline at end of file diff --git a/sdnr/wt/odlux/apps/eventLogApp/src/handlers/eventLogAppRootHandler.ts b/sdnr/wt/odlux/apps/eventLogApp/src/handlers/eventLogAppRootHandler.ts deleted file mode 100644 index 6e2d40efd..000000000 --- a/sdnr/wt/odlux/apps/eventLogApp/src/handlers/eventLogAppRootHandler.ts +++ /dev/null @@ -1,45 +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 ** -import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore'; -import { IActionHandler } from '../../../../framework/src/flux/action'; -import { IEventLogState, eventLogActionHandler } from './eventLogHandler'; - - -export interface IEventLogAppStateState { - logEntries: IEventLogState -} - - -declare module '../../../../framework/src/store/applicationStore' { - interface IApplicationStoreState { - eventLog: IEventLogAppStateState; - } -} - -const actionHandlers = { - logEntries: eventLogActionHandler -}; - -export const EventLogAppRootHandler = combineActionHandler(actionHandlers); -export default EventLogAppRootHandler; - diff --git a/sdnr/wt/odlux/apps/eventLogApp/src/handlers/eventLogHandler.tsx b/sdnr/wt/odlux/apps/eventLogApp/src/handlers/eventLogHandler.tsx deleted file mode 100644 index 300a8f7b3..000000000 --- a/sdnr/wt/odlux/apps/eventLogApp/src/handlers/eventLogHandler.tsx +++ /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 { EventLogType } from '../models/eventLogType'; - -export interface IEventLogState extends IExternalTableState { } - -// create eleactic search material data fetch handler -const eventLogSearchHandler = createSearchDataHandler("eventlog"); - -export const { - actionHandler: eventLogActionHandler, - createActions: createEventLogActions, - createProperties: createEventLogProperties, - reloadAction: eventLogReloadAction, - - // set value action, to change a value -} = createExternal(eventLogSearchHandler, appState => appState.eventLog.logEntries); - diff --git a/sdnr/wt/odlux/apps/eventLogApp/src/index.html b/sdnr/wt/odlux/apps/eventLogApp/src/index.html deleted file mode 100644 index 8027509e6..000000000 --- a/sdnr/wt/odlux/apps/eventLogApp/src/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - EventLog App - - - -
- - - - - - \ No newline at end of file diff --git a/sdnr/wt/odlux/apps/eventLogApp/src/models/eventLogType.ts b/sdnr/wt/odlux/apps/eventLogApp/src/models/eventLogType.ts deleted file mode 100644 index 7c68e6497..000000000 --- a/sdnr/wt/odlux/apps/eventLogApp/src/models/eventLogType.ts +++ /dev/null @@ -1,27 +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========================================================================== - */ -export { HitEntry, Result } from '../../../../framework/src/models'; -export type EventLogType = { - nodeId: string; - counter: number; - timestamp: string; - objectId: string; - attributeName: string; - newValue: string; - sourceType: string; -} diff --git a/sdnr/wt/odlux/apps/eventLogApp/src/pluginEventLog.tsx b/sdnr/wt/odlux/apps/eventLogApp/src/pluginEventLog.tsx deleted file mode 100644 index 8ee322a8e..000000000 --- a/sdnr/wt/odlux/apps/eventLogApp/src/pluginEventLog.tsx +++ /dev/null @@ -1,42 +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========================================================================== -*/ -// app configuration and main entry point for the app - -import React, { FC } from 'react'; - -import applicationManager from '../../../framework/src/services/applicationManager'; - -import { EventLog } from './views/eventLog'; -import eventLogAppRootHandler from './handlers/eventLogAppRootHandler'; - -const appIcon = require('./assets/icons/eventLogAppIcon.svg'); // select app icon - -const App : FC = () => { - return ; -}; - -export function register() { - applicationManager.registerApplication({ - name: 'eventLog', - icon: appIcon, - rootActionHandler: eventLogAppRootHandler, - rootComponent: App, - menuEntry: 'EventLog', - }); -} - diff --git a/sdnr/wt/odlux/apps/eventLogApp/src/views/eventLog.tsx b/sdnr/wt/odlux/apps/eventLogApp/src/views/eventLog.tsx deleted file mode 100644 index 1fc53f284..000000000 --- a/sdnr/wt/odlux/apps/eventLogApp/src/views/eventLog.tsx +++ /dev/null @@ -1,102 +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 * as React from "react"; - -import { Connect, connect, IDispatcher } from '../../../../framework/src/flux/connect'; -import { MaterialTable, MaterialTableCtorType } from '../../../../framework/src/components/material-table'; -import Refresh from '@mui/icons-material/Refresh'; - -import { EventLogType } from '../models/eventLogType'; -import { IApplicationStoreState } from "../../../../framework/src/store/applicationStore"; -import { createEventLogProperties, createEventLogActions } from "../handlers/eventLogHandler"; -import RefreshEventLogDialog, { RefreshEventLogDialogMode } from '../components/refreshEventLogDialog'; - -const EventLogTable = MaterialTable as MaterialTableCtorType; - -const mapProps = (state: IApplicationStoreState) => ({ - eventLogProperties: createEventLogProperties(state), - eventLog: state.eventLog.logEntries -}); - -const mapDispatch = (dispatcher: IDispatcher) => ({ - eventLogActions: createEventLogActions(dispatcher.dispatch) -}); - -type EventLogComponentProps = Connect; -type EventLogComponentState = { - refreshEventLogEditorMode: RefreshEventLogDialogMode -} -let initalSorted = false; - -class EventLogComponent extends React.Component { - constructor(props: EventLogComponentProps) { - super(props); - - this.state = { - refreshEventLogEditorMode: RefreshEventLogDialogMode.None - }; - } - - render(): JSX.Element { - - const refreshEventLogAction = { - icon: Refresh, tooltip: 'Refresh Event log', ariaLabel:'refresh', onClick: () => { - this.setState({ - refreshEventLogEditorMode: RefreshEventLogDialogMode.RefreshEventLogTable - }); - } - }; - return ( - <> - - - - - ) - } - - private onCloseRefreshEventLogDialog = () => { - this.setState({ - refreshEventLogEditorMode: RefreshEventLogDialogMode.None - }); - } - componentDidMount() { - - if (!initalSorted) { - initalSorted = true; - this.props.eventLogActions.onHandleExplicitRequestSort("timestamp", "desc"); - } else { - this.props.eventLogActions.onRefresh(); - } - } -} - -export const EventLog = connect(mapProps, mapDispatch)(EventLogComponent); -export default EventLog; \ No newline at end of file -- cgit 1.2.3-korg