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 --- .../src/actions/commonNetworkElementsActions.ts | 2 +- .../src/actions/connectionStatusCountActions.ts | 52 ++++ .../src/handlers/connectAppRootHandler.ts | 5 +- .../src/handlers/connectionStatusCountHandler.ts | 58 +++++ .../connectApp/src/models/connectionStatusCount.ts | 43 ++++ .../wt/odlux/apps/connectApp/src/pluginConnect.tsx | 65 ++++- .../src/services/connectionStatusCountService.ts | 54 ++++ sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx | 23 ++ .../apps/faultApp/src/views/faultApplication.tsx | 6 +- 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 ++++++++++++++++++++- sdnr/wt/odlux/odlux.properties | 6 +- sdnr/wt/odlux/package.json | 4 +- sdnr/wt/odlux/yarn.lock | 187 ++++++++------ 27 files changed, 769 insertions(+), 125 deletions(-) create mode 100644 sdnr/wt/odlux/apps/connectApp/src/actions/connectionStatusCountActions.ts create mode 100644 sdnr/wt/odlux/apps/connectApp/src/handlers/connectionStatusCountHandler.ts create mode 100644 sdnr/wt/odlux/apps/connectApp/src/models/connectionStatusCount.ts create mode 100644 sdnr/wt/odlux/apps/connectApp/src/services/connectionStatusCountService.ts 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') diff --git a/sdnr/wt/odlux/apps/connectApp/src/actions/commonNetworkElementsActions.ts b/sdnr/wt/odlux/apps/connectApp/src/actions/commonNetworkElementsActions.ts index a83e00239..0c3266216 100644 --- a/sdnr/wt/odlux/apps/connectApp/src/actions/commonNetworkElementsActions.ts +++ b/sdnr/wt/odlux/apps/connectApp/src/actions/commonNetworkElementsActions.ts @@ -28,7 +28,7 @@ import { connectionStatusLogReloadAction } from '../handlers/connectionStatusLog import { PanelId } from '../models/panelId'; import { guiCutThrough } from '../models/guiCutTrough'; -import { connectService} from '../services/connectService'; +import { connectService} from '../services/connectService'; export class SetPanelAction extends Action { diff --git a/sdnr/wt/odlux/apps/connectApp/src/actions/connectionStatusCountActions.ts b/sdnr/wt/odlux/apps/connectApp/src/actions/connectionStatusCountActions.ts new file mode 100644 index 000000000..e1e16b704 --- /dev/null +++ b/sdnr/wt/odlux/apps/connectApp/src/actions/connectionStatusCountActions.ts @@ -0,0 +1,52 @@ +/** + * ============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========================================================================== + */ +import { getConnectionStatusCountStateFromDatabase } from '../services/connectionStatusCountService'; +import { Dispatch } from '../../../../framework/src/flux/store'; + +import { Action } from '../../../../framework/src/flux/action'; + + +export class ConnectionStatusCountBaseAction extends Action { } + + +export class SetConnectionStatusCountAction extends ConnectionStatusCountBaseAction { + constructor(public ConnectedCount: number, public ConnectingCount: number, public DisconnectedCount: number, + public MountedCount: number, public UnableToConnectCount: number, public UndefinedCount: number, public UnmountedCount: number, public totalCount: number) { + super(); + } +} + + +export const refreshConnectionStatusCountAsyncAction = async (dispatch: Dispatch) => { + const result = await getConnectionStatusCountStateFromDatabase().catch(_ => null); + if (result) { + const statusAction = new SetConnectionStatusCountAction( + result["Connected"] || 0, + result["Connecting"] || 0, + result["Disconnected"] || 0, + result["Mounted"] || 0, + result["UnableToConnect"] || 0, + result["Undefined"] || 0, + result["Unmounted"] || 0, + result["total"] || 0 + ); + dispatch(statusAction); + return; + } + dispatch(new SetConnectionStatusCountAction(0, 0, 0, 0, 0, 0, 0, 0)); +} diff --git a/sdnr/wt/odlux/apps/connectApp/src/handlers/connectAppRootHandler.ts b/sdnr/wt/odlux/apps/connectApp/src/handlers/connectAppRootHandler.ts index c23e43924..70b64c976 100644 --- a/sdnr/wt/odlux/apps/connectApp/src/handlers/connectAppRootHandler.ts +++ b/sdnr/wt/odlux/apps/connectApp/src/handlers/connectAppRootHandler.ts @@ -24,6 +24,7 @@ import { IInfoNetworkElementsState, infoNetworkElementsActionHandler } from './i import { SetPanelAction, AddWebUriList, RemoveWebUri, SetWeburiSearchBusy } from '../actions/commonNetworkElementsActions'; import { PanelId } from '../models/panelId'; import { guiCutThrough } from '../models/guiCutTrough'; +import { connectionStatusCountHandler, IConnectionStatusCount } from './connectionStatusCountHandler'; export interface IConnectAppStoreState { networkElements: INetworkElementsState; @@ -31,6 +32,7 @@ export interface IConnectAppStoreState { currentOpenPanel: PanelId; elementInfo: IInfoNetworkElementsState; guiCutThrough: guiCutThroughState; + connectionStatusCount: IConnectionStatusCount; } const currentOpenPanelHandler: IActionHandler = (state = null, action) => { @@ -87,7 +89,8 @@ const actionHandlers = { connectionStatusLog: connectionStatusLogActionHandler, currentOpenPanel: currentOpenPanelHandler, elementInfo: infoNetworkElementsActionHandler, - guiCutThrough: guiCutThroughHandler + guiCutThrough: guiCutThroughHandler, + connectionStatusCount: connectionStatusCountHandler }; export const connectAppRootHandler = combineActionHandler(actionHandlers); diff --git a/sdnr/wt/odlux/apps/connectApp/src/handlers/connectionStatusCountHandler.ts b/sdnr/wt/odlux/apps/connectApp/src/handlers/connectionStatusCountHandler.ts new file mode 100644 index 000000000..611786520 --- /dev/null +++ b/sdnr/wt/odlux/apps/connectApp/src/handlers/connectionStatusCountHandler.ts @@ -0,0 +1,58 @@ +/** + * ============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========================================================================== + */ +import { IActionHandler } from "../../../../framework/src/flux/action"; +import { SetConnectionStatusCountAction } from "../actions/connectionStatusCountActions"; + +export interface IConnectionStatusCount { + Connected: number, + Connecting: number, + Disconnected: number, + Mounted: number, + UnableToConnect: number, + Undefined: number, + Unmounted: number, + total: number +} + +const connectionStatusCountInit: IConnectionStatusCount = { + Connected: 0, + Connecting: 0, + Disconnected: 0, + Mounted: 0, + UnableToConnect: 0, + Undefined: 0, + Unmounted: 0, + total: 0 +}; + +export const connectionStatusCountHandler: IActionHandler = (state = connectionStatusCountInit, action) => { + if (action instanceof SetConnectionStatusCountAction) { + state = { + Connected: action.ConnectedCount, + Connecting: action.ConnectingCount, + Disconnected: action.DisconnectedCount, + Mounted: action.MountedCount, + UnableToConnect: action.UnableToConnectCount, + Undefined: action.UndefinedCount, + Unmounted: action.UnmountedCount, + total: action.totalCount + } + } + + return state; +} \ No newline at end of file diff --git a/sdnr/wt/odlux/apps/connectApp/src/models/connectionStatusCount.ts b/sdnr/wt/odlux/apps/connectApp/src/models/connectionStatusCount.ts new file mode 100644 index 000000000..125a6e369 --- /dev/null +++ b/sdnr/wt/odlux/apps/connectApp/src/models/connectionStatusCount.ts @@ -0,0 +1,43 @@ +/** + * ============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.number (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.number + * + * 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========================================================================== + */ + +export type ConnectionStatusCountReturnType = { + Connected: number, + Connecting: number, + Disconnected: number, + Mounted: number, + UnableToConnect: number, + Undefined: number, + Unmounted: number, + total: number +}; + +export type ConnectionStatusCountType = { + Connected: number, + Connecting: number, + Disconnected: number, + Mounted: number, + UnableToConnect: number, + Undefined: number, + Unmounted: number, + total: number +}; + +export type ConnectionStatusCount = { + 'network-element-connections': ConnectionStatusCountReturnType +}; diff --git a/sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx b/sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx index 93bed1aad..461e14023 100644 --- a/sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx +++ b/sdnr/wt/odlux/apps/connectApp/src/pluginConnect.tsx @@ -16,22 +16,70 @@ * ============LICENSE_END========================================================================== */ +import * as React from "react"; +import { withRouter, RouteComponentProps, Route, Switch, Redirect } from 'react-router-dom'; import { faPlug } from '@fortawesome/free-solid-svg-icons'; import applicationManager from '../../../framework/src/services/applicationManager'; import { subscribe, IFormatedMessage } from '../../../framework/src/services/notificationService'; import { AddSnackbarNotification } from '../../../framework/src/actions/snackbarActions'; +import { IApplicationStoreState } from "../../../framework/src/store/applicationStore"; +import connect, { Connect, IDispatcher } from '../../../framework/src/flux/connect'; +import { findWebUrisForGuiCutThroughAsyncAction, updateCurrentViewAsyncAction, SetPanelAction } from './actions/commonNetworkElementsActions'; +import { refreshConnectionStatusCountAsyncAction } from './actions/connectionStatusCountActions'; +import { createNetworkElementsActions, createNetworkElementsProperties, networkElementsReloadAction } from './handlers/networkElementsHandler'; import connectAppRootHandler from './handlers/connectAppRootHandler'; import ConnectApplication from './views/connectView'; +import { PanelId } from "./models/panelId"; +import { NetworkElementsList } from './components/networkElements' -import { findWebUrisForGuiCutThroughAsyncAction, updateCurrentViewAsyncAction } from './actions/commonNetworkElementsActions'; +let currentStatus: string | undefined = undefined; + +const mapProps = (state: IApplicationStoreState) => ({ + currentProblemsProperties: createNetworkElementsProperties(state), +}); + +const mapDisp = (dispatcher: IDispatcher) => ({ + currentProblemsActions: createNetworkElementsActions(dispatcher.dispatch, true), + setCurrentPanel: (panelId: PanelId) => dispatcher.dispatch(new SetPanelAction(panelId)), +}); + +const ConnectApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteComponentProps<{ status?: string }> & Connect) => { + if (currentStatus !== props.match.params.status) { + currentStatus = props.match.params.status || undefined; + window.setTimeout(() => { + if (currentStatus) { + props.setCurrentPanel("NetworkElements"); + props.currentProblemsActions.onFilterChanged("status", currentStatus); + if (!props.currentProblemsProperties.showFilter) { + props.currentProblemsActions.onToggleFilter(false); + props.currentProblemsActions.onRefresh(); + } + else + props.currentProblemsActions.onRefresh(); + } + }); + } + return ( + + ) +}); + + +const App = withRouter((props: RouteComponentProps) => ( + + + + + +)); export function register() { const applicationApi = applicationManager.registerApplication({ name: "connect", icon: faPlug, - rootComponent: ConnectApplication, + rootComponent: App, rootActionHandler: connectAppRootHandler, menuEntry: "Connect" }); @@ -52,4 +100,17 @@ export function register() { }); } })); + + applicationApi.applicationStoreInitialized.then(store => { + store.dispatch(networkElementsReloadAction); + }); + + applicationApi.applicationStoreInitialized.then(store => { + store.dispatch(refreshConnectionStatusCountAsyncAction); + }); + window.setInterval(() => { + applicationApi.applicationStoreInitialized.then(store => { + store.dispatch(refreshConnectionStatusCountAsyncAction); + }); + }, 15000); } \ No newline at end of file diff --git a/sdnr/wt/odlux/apps/connectApp/src/services/connectionStatusCountService.ts b/sdnr/wt/odlux/apps/connectApp/src/services/connectionStatusCountService.ts new file mode 100644 index 000000000..519c965c4 --- /dev/null +++ b/sdnr/wt/odlux/apps/connectApp/src/services/connectionStatusCountService.ts @@ -0,0 +1,54 @@ +/** + * ============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========================================================================== + */ + +import { requestRest } from "../../../../framework/src/services/restService"; +import { Result } from "../../../../framework/src/models/elasticSearch"; +import { ConnectionStatusCountType, ConnectionStatusCount } from "../models/connectionStatusCount"; + + + +export const getConnectionStatusCountStateFromDatabase = async (): Promise => { + const path = 'rests/operations/data-provider:read-status'; + const result = await requestRest>(path, { method: "POST" }); + let connectionStatusCountType: ConnectionStatusCountType = { + Connected: 0, + Connecting: 0, + Disconnected: 0, + Mounted: 0, + UnableToConnect: 0, + Undefined: 0, + Unmounted: 0, + total: 0 + } + let connectionStatusCount: ConnectionStatusCount[] | null = null; + + if (result && result["data-provider:output"] && result["data-provider:output"].data) { + connectionStatusCount = result["data-provider:output"].data; + connectionStatusCountType = { + Connected: connectionStatusCount[0]["network-element-connections"].Connected, + Connecting: connectionStatusCount[0]["network-element-connections"].Connecting, + Disconnected: connectionStatusCount[0]["network-element-connections"].Disconnected, + Mounted: connectionStatusCount[0]["network-element-connections"].Mounted, + UnableToConnect: connectionStatusCount[0]["network-element-connections"].UnableToConnect, + Undefined: connectionStatusCount[0]["network-element-connections"].Undefined, + Unmounted: connectionStatusCount[0]["network-element-connections"].Unmounted, + total: connectionStatusCount[0]["network-element-connections"].total, + } + } + return connectionStatusCountType; +} diff --git a/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx b/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx index bf96fe38d..06299417d 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx +++ b/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx @@ -42,6 +42,7 @@ import { FaultStatus } from "./components/faultStatus"; import { refreshFaultStatusAsyncAction } from "./actions/statusActions"; let currentMountId: string | undefined = undefined; +let currentSeverity: string | undefined = undefined; const mapProps = (state: IApplicationStoreState) => ({ currentProblemsProperties: createCurrentProblemsProperties(state), @@ -75,8 +76,30 @@ const FaultApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteCom ) }); +const FaulttApplicationAlarmStatusRouteAdapter = connect(mapProps, mapDisp)((props: RouteComponentProps<{ severity?: string }> & Connect) => { + if (currentSeverity !== props.match.params.severity) { + currentSeverity = props.match.params.severity || undefined; + window.setTimeout(() => { + if (currentSeverity) { + props.setCurrentPanel("CurrentProblem"); + props.currentProblemsActions.onFilterChanged("severity", currentSeverity); + if (!props.currentProblemsProperties.showFilter) { + props.currentProblemsActions.onToggleFilter(false); + props.currentProblemsActions.onRefresh(); + } + else + props.currentProblemsActions.onRefresh(); + } + }); + } + return ( + + ) +}); + const App = withRouter((props: RouteComponentProps) => ( + diff --git a/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx b/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx index 6075066fd..7b0c23693 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx +++ b/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx @@ -137,7 +137,7 @@ class FaultApplicationComponent extends React.Component 0 - const customActions = areFaultsAvailable ? [refreshButton, refreshCurrentProblemsAction] : [refreshCurrentProblemsAction]; + const customActions = areFaultsAvailable ? [clearAlarmsAction, refreshCurrentProblemsAction] : [refreshCurrentProblemsAction]; const { panelId: activePanelId } = this.props; @@ -191,7 +191,7 @@ class FaultApplicationComponent extends React.Component ${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 @@