aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/faultApp/src
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-03-31 12:40:19 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-31 12:40:19 +0000
commit6ec75490615fc3238926531b1fe555ee0adb9b27 (patch)
tree6c7ff74b6683e14b9f08e6d582c49388f7b0f0b0 /sdnr/wt/odlux/apps/faultApp/src
parentd693378eaecbe21675c89688ef89353949254350 (diff)
parent62e834802dae0bd15504785503060d7875c7b4ad (diff)
Merge "Add SDN-R odlux performance"
Diffstat (limited to 'sdnr/wt/odlux/apps/faultApp/src')
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/handlers/alarmLogEntriesHandler.ts4
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/handlers/currentProblemsHandler.ts4
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts2
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/plugin.tsx14
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx22
5 files changed, 23 insertions, 23 deletions
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<Fault>(alarmLogEntriesSearchHandler, appState => appState.faultApp.alarmLogEntries);
+ // set value action, to change a value
+} = createExternal<Fault>(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<Fault>(currentProblemsSearchHandler, appState => appState.faultApp.currentProblems);
+ // set value action, to change a value
+} = createExternal<Fault>(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<string | null> = (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<typeof mapProps, typeof mapDisp>) => {
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) => (
<Switch>
- <Route path={ `${ props.match.path }/:mountId?` } component={ FaultApplicationRouteAdapter } />
+ <Route path={ `${ props.match.path }/:mountId?` } component={ FaultApplicationRouteAdapter } />
<Redirect to={ `${ props.match.path }` } />
</Switch>
-));
-
+));
+
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<typeof mapPr
const FaultTable = MaterialTable as MaterialTableCtorType<Fault>;
class FaultApplicationComponent extends React.Component<FaultApplicationComponentProps>{
-
+
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<FaultApplicationComponen
return (
<>
<Panel activePanel={ activePanel } panelId={ 'CurrentProblem' } onToggle={ onTogglePanel } title={ 'Current Problem List' }>
- <FaultTable idProperty={ '_id' } columns={ [
+ <FaultTable idProperty={ '_id' } columns={ [
{ property: "icon", title: "", type: ColumnType.custom, customControl: this.renderIcon },
{ property: "timeStamp", type: ColumnType.text, title: "Time Stamp" },
{ property: "nodeName", title: "Node Name", type: ColumnType.text },
@@ -76,7 +76,7 @@ class FaultApplicationComponent extends React.Component<FaultApplicationComponen
{ property: "severity", title: "Severity", type: ColumnType.text, width: "140px" },
] } { ...this.props.currentProblemsProperties } { ...this.props.currentProblemsActions } />
</Panel>
- <Panel activePanel={ activePanel } panelId={ 'AlarmNotifications' } onToggle={ onTogglePanel } title={ `Alarm Notifications ${this.props.faultNotifications.faults.length} ${this.props.faultNotifications.since}` }>
+ <Panel activePanel={ activePanel } panelId={ 'AlarmNotifications' } onToggle={ onTogglePanel } title={ `Alarm Notifications ${this.props.faultNotifications.faults.length} since ${this.props.faultNotifications.since}` }>
<FaultTable rows={ this.props.faultNotifications.faults } asynchronus columns={ [
{ property: "icon", title: "", type: ColumnType.custom, customControl: this.renderIcon },
{ property: "timeStamp", title: "Time Stamp" },
@@ -104,9 +104,9 @@ class FaultApplicationComponent extends React.Component<FaultApplicationComponen
private renderIcon = (props: { rowData: Fault }) => {
return (
- <FontAwesomeIcon icon={ faExclamationTriangle } />
+ <FontAwesomeIcon icon={ faExclamationTriangle } />
);
- };
+ };
}