From 62e834802dae0bd15504785503060d7875c7b4ad Mon Sep 17 00:00:00 2001 From: Herbert Eiselt Date: Thu, 28 Mar 2019 19:00:35 +0100 Subject: Add SDN-R odlux performance A UI displaying performance monitoring data Change-Id: I2a9c28549aee1bcac366354c343a63f884bf09e0 Issue-ID: SDNC-585 Signed-off-by: Herbert Eiselt --- sdnr/wt/odlux/apps/faultApp/pom.xml | 8 +++++--- .../src/handlers/alarmLogEntriesHandler.ts | 4 ++-- .../src/handlers/currentProblemsHandler.ts | 4 ++-- .../faultApp/src/handlers/faultAppRootHandler.ts | 2 +- sdnr/wt/odlux/apps/faultApp/src/plugin.tsx | 14 +++++++------- .../apps/faultApp/src/views/faultApplication.tsx | 22 +++++++++++----------- 6 files changed, 28 insertions(+), 26 deletions(-) (limited to 'sdnr/wt/odlux/apps/faultApp') diff --git a/sdnr/wt/odlux/apps/faultApp/pom.xml b/sdnr/wt/odlux/apps/faultApp/pom.xml index 376449bc0..5bfcd52ec 100644 --- a/sdnr/wt/odlux/apps/faultApp/pom.xml +++ b/sdnr/wt/odlux/apps/faultApp/pom.xml @@ -1,11 +1,13 @@ - + org.onap.ccsdk.parent odlparent 1.2.2-SNAPSHOT - + 4.0.0 @@ -126,7 +128,7 @@ org.onap.ccsdk.features.sdnr.wt.odlux.model.*,com.opensymphony.* - + diff --git a/sdnr/wt/odlux/apps/faultApp/src/handlers/alarmLogEntriesHandler.ts b/sdnr/wt/odlux/apps/faultApp/src/handlers/alarmLogEntriesHandler.ts index 0b974207b..3cc467546 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/handlers/alarmLogEntriesHandler.ts +++ b/sdnr/wt/odlux/apps/faultApp/src/handlers/alarmLogEntriesHandler.ts @@ -19,6 +19,6 @@ export const { createProperties: createAlarmLogEntriesProperties, reloadAction: alarmLogEntriesReloadAction, - // set value action, to change a value -} = createExternal(alarmLogEntriesSearchHandler, appState => appState.faultApp.alarmLogEntries); + // set value action, to change a value +} = createExternal(alarmLogEntriesSearchHandler, appState => appState.fault.alarmLogEntries); diff --git a/sdnr/wt/odlux/apps/faultApp/src/handlers/currentProblemsHandler.ts b/sdnr/wt/odlux/apps/faultApp/src/handlers/currentProblemsHandler.ts index 6bbe2976f..67eb10d32 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/handlers/currentProblemsHandler.ts +++ b/sdnr/wt/odlux/apps/faultApp/src/handlers/currentProblemsHandler.ts @@ -19,6 +19,6 @@ export const { createProperties: createCurrentProblemsProperties, reloadAction: currentProblemsReloadAction, - // set value action, to change a value -} = createExternal(currentProblemsSearchHandler, appState => appState.faultApp.currentProblems); + // set value action, to change a value +} = createExternal(currentProblemsSearchHandler, appState => appState.fault.currentProblems); diff --git a/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts b/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts index 005e3e5a4..a887a3327 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts +++ b/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts @@ -27,7 +27,7 @@ const currentOpenPanelHandler: IActionHandler = (state = null, ac declare module '../../../../framework/src/store/applicationStore' { interface IApplicationStoreState { - faultApp: IFaultAppStoreState; + fault: IFaultAppStoreState; } } diff --git a/sdnr/wt/odlux/apps/faultApp/src/plugin.tsx b/sdnr/wt/odlux/apps/faultApp/src/plugin.tsx index 6f83e74dc..c4545ad1a 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/plugin.tsx +++ b/sdnr/wt/odlux/apps/faultApp/src/plugin.tsx @@ -1,7 +1,7 @@ // app configuration and main entry point for the app -import * as React from "react"; +import * as React from "react"; import { withRouter, RouteComponentProps, Route, Switch, Redirect } from 'react-router-dom'; import connect, { Connect, IDispatcher } from '../../../framework/src/flux/connect'; @@ -22,7 +22,7 @@ import { AddFaultNotificationAction } from "./actions/notificationActions"; import { createCurrentProblemsProperties, createCurrentProblemsActions } from "./handlers/currentProblemsHandler"; -let currentMountId: string | undefined = undefined; +let currentMountId: string | undefined = undefined; const mapProps = (state: IApplicationStoreState) => ({ currentProblemsProperties: createCurrentProblemsProperties(state), @@ -35,7 +35,7 @@ const mapDisp = (dispatcher: IDispatcher) => ({ const FaultApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteComponentProps<{ mountId?: string }> & Connect) => { if (currentMountId !== props.match.params.mountId) { - // route parameter has changed + // route parameter has changed currentMountId = props.match.params.mountId || undefined; // Hint: This timeout is need, since it is not recommended to change the state while rendering is in progress ! window.setTimeout(() => { @@ -54,14 +54,14 @@ const FaultApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteCom const App = withRouter((props: RouteComponentProps) => ( - + -)); - +)); + export function register() { const applicationApi = applicationManager.registerApplication({ - name: "faultApp", + name: "fault", icon: faBell, rootComponent: App, rootActionHandler: faultAppRootHandler, diff --git a/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx b/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx index 9eb3a00ff..d4c7c597a 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx +++ b/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; +import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; import { MaterialTable, ColumnType, MaterialTableCtorType } from '../../../../framework/src/components/material-table'; import { Panel } from '../../../../framework/src/components/material-ui'; @@ -19,9 +19,9 @@ import { createAlarmLogEntriesProperties, createAlarmLogEntriesActions, alarmLog import { SetPanelAction } from '../actions/panelChangeActions'; const mapProps = (state: IApplicationStoreState) => ({ - activePanel: state.faultApp.currentOpenPanel, + activePanel: state.fault.currentOpenPanel, currentProblemsProperties: createCurrentProblemsProperties(state), - faultNotifications: state.faultApp.faultNotifications, + faultNotifications: state.fault.faultNotifications, alarmLogEntriesProperties: createAlarmLogEntriesProperties(state) }); @@ -39,15 +39,15 @@ type FaultApplicationComponentProps = RouteComponentProps & Connect; class FaultApplicationComponent extends React.Component{ - + render(): JSX.Element { - + const { activePanel } = this.props; - + const onTogglePanel = (panelId: PanelId) => { const nextActivePanel = panelId === this.props.activePanel ? null : panelId; this.props.setCurrentPanel(nextActivePanel); - + switch (nextActivePanel) { case 'CurrentProblem': this.props.reloadCurrentProblems(); @@ -66,7 +66,7 @@ class FaultApplicationComponent extends React.Component - - + { return ( - + ); - }; + }; } -- cgit 1.2.3-korg