aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/faultApp
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/faultApp')
-rw-r--r--sdnr/wt/odlux/apps/faultApp/pom.xml8
-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
6 files changed, 28 insertions, 26 deletions
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 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent</artifactId>
<version>1.2.2-SNAPSHOT</version>
- <relativePath/>
+ <relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -126,7 +128,7 @@
<configuration>
<instructions>
<Import-Package>org.onap.ccsdk.features.sdnr.wt.odlux.model.*,com.opensymphony.*</Import-Package>
- <Private-Package/>
+ <Private-Package></Private-Package>
</instructions>
</configuration>
</plugin>
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 } />
);
- };
+ };
}