From 7152b77370d1989e4429ce37ec25b1e1baace0da Mon Sep 17 00:00:00 2001 From: Aijana Schumann Date: Tue, 6 Jul 2021 16:01:10 +0200 Subject: Add dashboard to odlux Add connected element and fault info to home page Issue-ID: CCSDK-3238 Signed-off-by: Aijana Schumann Change-Id: Ia47442fd0877b721d25d9f97e3a19088df193439 --- sdnr/wt/odlux/framework/package.json | 8 +- sdnr/wt/odlux/framework/pom.xml | 2 +- sdnr/wt/odlux/framework/src/app.css | 1 + sdnr/wt/odlux/framework/src/app.tsx | 10 - .../framework/src/assets/images/odluxLogo.gif | Bin 0 -> 5709 bytes .../framework/src/assets/images/odluxLogo.gif.d.ts | 20 ++ .../odlux/framework/src/assets/images/onapLogo.gif | Bin 0 -> 9249 bytes .../framework/src/assets/images/onapLogo.gif.d.ts | 20 ++ .../framework/src/components/errorDisplay.tsx | 2 +- sdnr/wt/odlux/framework/src/design/default.ts | 3 +- .../src/handlers/applicationStateHandler.ts | 21 +- sdnr/wt/odlux/framework/src/index.dev.html | 6 +- .../framework/src/services/notificationService.ts | 2 +- sdnr/wt/odlux/framework/src/views/about.tsx | 9 +- sdnr/wt/odlux/framework/src/views/home.tsx | 285 ++++++++++++++++++++- 15 files changed, 355 insertions(+), 34 deletions(-) create mode 100644 sdnr/wt/odlux/framework/src/assets/images/odluxLogo.gif create mode 100644 sdnr/wt/odlux/framework/src/assets/images/odluxLogo.gif.d.ts create mode 100644 sdnr/wt/odlux/framework/src/assets/images/onapLogo.gif create mode 100644 sdnr/wt/odlux/framework/src/assets/images/onapLogo.gif.d.ts (limited to 'sdnr/wt/odlux/framework') diff --git a/sdnr/wt/odlux/framework/package.json b/sdnr/wt/odlux/framework/package.json index 345fc8b4c..c2ad49c79 100644 --- a/sdnr/wt/odlux/framework/package.json +++ b/sdnr/wt/odlux/framework/package.json @@ -37,8 +37,8 @@ "react": "17.0.1", "react-dom": "17.0.1", "react-router-dom": "5.2.0", - "@fortawesome/react-fontawesome": "0.1.3", - "@fortawesome/fontawesome-svg-core": "1.2.12", + "@fortawesome/react-fontawesome": "0.1.14", + "@fortawesome/fontawesome-svg-core": "1.2.35", "@fortawesome/free-solid-svg-icons": "5.6.3", "jsonwebtoken": "8.3.0", "@types/jsonwebtoken": "7.2.8" @@ -46,6 +46,8 @@ "dependencies": { "@babel/polyfill": "^7.0.0", "@types/x2js": "^3.1.0", - "http-server": "^0.11.1" + "chart.js": "^3.4.0", + "http-server": "^0.11.1", + "react-chartjs-2": "^3.0.3" } } diff --git a/sdnr/wt/odlux/framework/pom.xml b/sdnr/wt/odlux/framework/pom.xml index 9d648b52d..3e947539f 100644 --- a/sdnr/wt/odlux/framework/pom.xml +++ b/sdnr/wt/odlux/framework/pom.xml @@ -46,7 +46,7 @@ ${maven.build.timestamp} ONAP Frankfurt (Neon, mdsal ${odl.mdsal.version}) - 96.078ad12(21/03/25) + 110.0d5d064(21/07/05) ONAP SDN-R | ONF Wireless for ${distversion} - Build: ${buildtime} ${buildno} ${project.version} diff --git a/sdnr/wt/odlux/framework/src/app.css b/sdnr/wt/odlux/framework/src/app.css index f70fbc0e4..9b653b3b5 100644 --- a/sdnr/wt/odlux/framework/src/app.css +++ b/sdnr/wt/odlux/framework/src/app.css @@ -1,5 +1,6 @@ html, body, #app { height: 100%; + min-width: 1000px; padding: 0px; margin: 0px; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; diff --git a/sdnr/wt/odlux/framework/src/app.tsx b/sdnr/wt/odlux/framework/src/app.tsx index 2d913be1b..7e162cd51 100644 --- a/sdnr/wt/odlux/framework/src/app.tsx +++ b/sdnr/wt/odlux/framework/src/app.tsx @@ -106,13 +106,3 @@ export const runApplication = () => { }; -if (process.env.NODE_ENV === "development") { - const addTransportPCEUrl = () =>{ - const url = window.localStorage.getItem(transportPCEUrl); - if(url === null){ - window.localStorage.setItem(transportPCEUrl, "http://10.20.6.32:18082/"); - console.log("set transport url :D") - } - } - addTransportPCEUrl(); -} diff --git a/sdnr/wt/odlux/framework/src/assets/images/odluxLogo.gif b/sdnr/wt/odlux/framework/src/assets/images/odluxLogo.gif new file mode 100644 index 000000000..ad188a8d3 Binary files /dev/null and b/sdnr/wt/odlux/framework/src/assets/images/odluxLogo.gif differ diff --git a/sdnr/wt/odlux/framework/src/assets/images/odluxLogo.gif.d.ts b/sdnr/wt/odlux/framework/src/assets/images/odluxLogo.gif.d.ts new file mode 100644 index 000000000..36131834c --- /dev/null +++ b/sdnr/wt/odlux/framework/src/assets/images/odluxLogo.gif.d.ts @@ -0,0 +1,20 @@ +/** + * ============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========================================================================== + */ + +declare const odluxLogo: string; +export default odluxLogo; \ No newline at end of file diff --git a/sdnr/wt/odlux/framework/src/assets/images/onapLogo.gif b/sdnr/wt/odlux/framework/src/assets/images/onapLogo.gif new file mode 100644 index 000000000..cd7eb8f3c Binary files /dev/null and b/sdnr/wt/odlux/framework/src/assets/images/onapLogo.gif differ diff --git a/sdnr/wt/odlux/framework/src/assets/images/onapLogo.gif.d.ts b/sdnr/wt/odlux/framework/src/assets/images/onapLogo.gif.d.ts new file mode 100644 index 000000000..5bfb37a84 --- /dev/null +++ b/sdnr/wt/odlux/framework/src/assets/images/onapLogo.gif.d.ts @@ -0,0 +1,20 @@ +/** + * ============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========================================================================== + */ + + declare const onapLogo: string; + export default onapLogo; \ No newline at end of file diff --git a/sdnr/wt/odlux/framework/src/components/errorDisplay.tsx b/sdnr/wt/odlux/framework/src/components/errorDisplay.tsx index 4cf63e927..1060d4b6d 100644 --- a/sdnr/wt/odlux/framework/src/components/errorDisplay.tsx +++ b/sdnr/wt/odlux/framework/src/components/errorDisplay.tsx @@ -72,7 +72,7 @@ type ErrorDisplayProps = WithStyles & Connect; // } /** - * Represents a compnent for formaing and displaying errors. + * Represents a component for formatting and displaying errors. */ class ErrorDisplayComponent extends React.Component { constructor(props: ErrorDisplayProps) { diff --git a/sdnr/wt/odlux/framework/src/design/default.ts b/sdnr/wt/odlux/framework/src/design/default.ts index 542c436f6..59b8c20ef 100644 --- a/sdnr/wt/odlux/framework/src/design/default.ts +++ b/sdnr/wt/odlux/framework/src/design/default.ts @@ -32,12 +32,13 @@ *****************************************************************************/ import { createMuiTheme } from '@material-ui/core/styles'; +import onapLogo from '../assets/images/onapLogo.gif' const theme = createMuiTheme({ design: { id: "onap", name: "Open Networking Automation Plattform (ONAP)", - url: "https://www.onap.org/wp-content/uploads/sites/20/2017/02/logo_onap_2017.png", + url: onapLogo, height: 49, width: 229, logoHeight: 32, diff --git a/sdnr/wt/odlux/framework/src/handlers/applicationStateHandler.ts b/sdnr/wt/odlux/framework/src/handlers/applicationStateHandler.ts index 06df6709f..6426066f6 100644 --- a/sdnr/wt/odlux/framework/src/handlers/applicationStateHandler.ts +++ b/sdnr/wt/odlux/framework/src/handlers/applicationStateHandler.ts @@ -29,7 +29,16 @@ import { ErrorInfo } from '../models/errorInfo'; import { SnackbarItem } from '../models/snackbarItem'; import { ExternalLoginProvider } from '../models/externalLoginProvider'; import { ApplicationConfig } from '../models/applicationConfig'; +import { IConnectAppStoreState } from '../../../apps/connectApp/src/handlers/connectAppRootHandler'; +import { IFaultAppStoreState } from '../../../apps/faultApp/src/handlers/faultAppRootHandler'; + +declare module '../store/applicationStore' { + interface IApplicationStoreState { + connect: IConnectAppStoreState; + fault: IFaultAppStoreState + } +} export interface IApplicationState { title: string; appId?: string; @@ -44,12 +53,12 @@ export interface IApplicationState { enablePolicy: boolean // false } -const applicationStateInit: IApplicationState = { - title: "Loading ...", - errors: [], - snackBars: [], - isMenuOpen: true, - isMenuClosedByUser: false, +const applicationStateInit: IApplicationState = { + title: "Loading ...", + errors: [], + snackBars: [], + isMenuOpen: true, + isMenuClosedByUser: false, isWebsocketAvailable: undefined, externalLoginProviders: null, authentication: "basic", diff --git a/sdnr/wt/odlux/framework/src/index.dev.html b/sdnr/wt/odlux/framework/src/index.dev.html index 240da266d..6c956386b 100644 --- a/sdnr/wt/odlux/framework/src/index.dev.html +++ b/sdnr/wt/odlux/framework/src/index.dev.html @@ -21,10 +21,10 @@