aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/maintenanceApp
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/maintenanceApp')
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/pom.xml8
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/src/actions/maintenenceActions.ts2
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/src/handlers/maintenanceAppRootHandler.ts4
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/src/plugin.tsx4
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx17
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js4
6 files changed, 25 insertions, 14 deletions
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/pom.xml b/sdnr/wt/odlux/apps/maintenanceApp/pom.xml
index cdbc9b096..87ff29043 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/pom.xml
+++ b/sdnr/wt/odlux/apps/maintenanceApp/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>
<groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
@@ -125,7 +127,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/maintenanceApp/src/actions/maintenenceActions.ts b/sdnr/wt/odlux/apps/maintenanceApp/src/actions/maintenenceActions.ts
index 753c1183f..3fe75ad51 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/src/actions/maintenenceActions.ts
+++ b/sdnr/wt/odlux/apps/maintenanceApp/src/actions/maintenenceActions.ts
@@ -30,7 +30,7 @@ export const loadAllMainteneceEntriesAsyncAction = (dispatch: Dispatch , getStat
}
// combine ell entries from the maintenance index with all networkelements
- const networkElements = getState().connectApp.mountedNetworkElements;
+ const networkElements = getState().connect.mountedNetworkElements;
const maintenenceEntries = networkElements.elements.reduce((acc, cur) => {
const entry = entries.find(e => e.mountId === cur.mountId);
acc.push(entry || {
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/handlers/maintenanceAppRootHandler.ts b/sdnr/wt/odlux/apps/maintenanceApp/src/handlers/maintenanceAppRootHandler.ts
index 956d05843..d2e387cc4 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/src/handlers/maintenanceAppRootHandler.ts
+++ b/sdnr/wt/odlux/apps/maintenanceApp/src/handlers/maintenanceAppRootHandler.ts
@@ -14,8 +14,8 @@ export interface IMaintenanceAppStoreState {
declare module '../../../../framework/src/store/applicationStore' {
interface IApplicationStoreState {
- maintenanceApp: IMaintenanceAppStoreState,
- connectApp: IConnectAppStoreState
+ maintenance: IMaintenanceAppStoreState,
+ connect: IConnectAppStoreState
}
}
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/plugin.tsx b/sdnr/wt/odlux/apps/maintenanceApp/src/plugin.tsx
index 19e188ec2..f23a875e3 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/src/plugin.tsx
+++ b/sdnr/wt/odlux/apps/maintenanceApp/src/plugin.tsx
@@ -16,11 +16,11 @@ const App : React.SFC = (props) => {
export function register() {
applicationManager.registerApplication({
- name: "maintenanceApp",
+ name: "maintenance",
icon: faLock,
rootComponent: App,
rootActionHandler: maintenanceAppRootHandler,
- menuEntry: "Maintenance App"
+ menuEntry: "Maintenance"
});
}
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx b/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
index f048d6cc5..b9ea8ffa1 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
+++ b/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
@@ -2,6 +2,9 @@ import * as React from 'react';
import { Theme, createStyles, WithStyles, withStyles, Tooltip } from '@material-ui/core';
+import { faBan } from '@fortawesome/free-solid-svg-icons';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+
import AddIcon from '@material-ui/icons/Add';
import EditIcon from '@material-ui/icons/Edit';
import RemoveIcon from '@material-ui/icons/RemoveCircleOutline';
@@ -37,8 +40,8 @@ const styles = (theme: Theme) => createStyles({
const MaintenenceEntriesTable = MaterialTable as MaterialTableCtorType<MaintenenceEntry>;
const mapProps = (state: IApplicationStoreState) => ({
- maintenenceEntries: state.maintenanceApp.maintenenceEntries.entries,
- busy: state.maintenanceApp.maintenenceEntries.busy
+ maintenenceEntries: state.maintenance.maintenenceEntries.entries,
+ busy: state.maintenance.maintenenceEntries.busy
});
const mapDispatcher = (dispatcher: IDispatcher) => ({
@@ -94,12 +97,18 @@ class MaintenenceViewComponent extends React.Component<MaintenenceViewComponentP
});
}
};
+ const now = new Date().valueOf();
return (
<>
<MaintenenceEntriesTable asynchronus rows={this.props.maintenenceEntries} customActionButtons={[ addMaintenenceEntryAction ]} columns={
[
- { property: "mountId", title: "Mount Id", type: ColumnType.text },
- { property: "active", title: "Active", type: ColumnType.boolean, labels: { "true": "active", "false": "not active" }, },
+ { property: "mountId", title: "Mount Id", type: ColumnType.text },
+ {
+ property: "notifications", title: "Notification", width: 50, align: "center", type: ColumnType.custom, customControl: ({ rowData }) => (
+ rowData.active && (Date.parse(rowData.start).valueOf() <= now) && (Date.parse(rowData.end).valueOf() >= now) && <FontAwesomeIcon icon={faBan} /> || null
+ )
+ },
+ { property: "active", title: "Activation State", type: ColumnType.boolean, labels: { "true": "active", "false": "not active" }, },
{ property: "start", title: "Start Date", type: ColumnType.text },
{ property: "end", title: "End Date", type: ColumnType.text },
{ property: "actions", title: "Actions", type: ColumnType.custom, customControl : ({ rowData })=>(
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js b/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js
index 0a2f5abb8..325e70380 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js
+++ b/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js
@@ -127,11 +127,11 @@ module.exports = (env) => {
},
proxy: {
"/restconf": {
- target: "http://localhost:8181",
+ target: "http://localhost:3000",
secure: false
},
"/database": {
- target: "http://localhost:8181",
+ target: "http://localhost:3000",
secure: false
}
}