From a2041a822f0406742edbd7a1074a73f9c838c0bf Mon Sep 17 00:00:00 2001 From: Aijana Schumann Date: Fri, 21 Feb 2020 12:45:38 +0100 Subject: Update odlux Update performance app: fix scrolling bug, reduce loading times, update ui to use tabs instead of panels, change the view to toggle between chart and table to better visualize data, minior bugfixes for other apps Issue-ID: SDNC-1080 Signed-off-by: Aijana Schumann Change-Id: I2b5cf3a5f580f4193421bc047e5256d8e9497e6b Signed-off-by: Aijana Schumann --- .../connectApp/src/components/networkElements.tsx | 60 +++++++++++++--------- 1 file changed, 36 insertions(+), 24 deletions(-) (limited to 'sdnr/wt/odlux/apps/connectApp') diff --git a/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx b/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx index 0370df7cb..45003e741 100644 --- a/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx +++ b/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx @@ -24,6 +24,7 @@ import LinkOffIcon from '@material-ui/icons/LinkOff'; import RemoveIcon from '@material-ui/icons/RemoveCircleOutline'; import EditIcon from '@material-ui/icons/Edit'; import Info from '@material-ui/icons/Info'; +import ComputerIcon from '@material-ui/icons/Computer'; import { MaterialTable, ColumnType, MaterialTableCtorType } from '../../../../framework/src/components/material-table'; import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore'; @@ -98,11 +99,42 @@ export class NetworkElementsListComponent extends React.Component this.onOpenMountdNetworkElementsDialog(event, rowData)} >Mount, + this.onOpenUnmountdNetworkElementsDialog(event, rowData)}>Unmount, + , + this.onOpenInfoNetworkElementDialog(event, rowData)} disabled={rowData.status === "Connecting" || rowData.status === "Disconnected"} >Info, + this.onOpenEditNetworkElementDialog(event, rowData)}>Edit, + !rowData.isRequired + ? this.onOpenAddNetworkElementDialog(event, rowData)} >Add + : this.onOpenRemoveNetworkElementDialog(event, rowData)} >Remove, + , + this.props.navigateToApplication("inventory", rowData.nodeId)}>Inventory, + , + this.props.navigateToApplication("fault", rowData.nodeId)} >Fault, + this.props.navigateToApplication("configuration", rowData.nodeId)} disabled={rowData.status === "Connecting" || rowData.status === "Disconnected" || !configuration}>Configure, + this.props.navigateToApplication("accounting", rowData.nodeId)} disabled={true}>Accounting, + this.props.navigateToApplication("performanceHistory", rowData.nodeId)}>Performance, + this.props.navigateToApplication("security", rowData.nodeId)} disabled={true} >Security, + ]; + + if (rowData.webUri) { + // add an icon for gui cuttrough, if weburi is available + return [ window.open(rowData.webUri, "_blank")} >Web Client].concat(buttonArray) + } else { + return buttonArray; + } + } + // private navigationCreator render(): JSX.Element { const { classes } = this.props; - const { framework, connect, configuration, fault, help, inventory, maintenance, mediator } = this.props.applicationState as any; const { networkElementToEdit } = this.state; const addRequireNetworkElementAction = { icon: AddIcon, tooltip: 'Add', onClick: () => { @@ -112,7 +144,7 @@ export class NetworkElementsListComponent extends React.Component { - return [ - this.onOpenMountdNetworkElementsDialog(event, rowData)} >Mount, - this.onOpenUnmountdNetworkElementsDialog(event, rowData)}>Unmount, - , - this.onOpenInfoNetworkElementDialog(event, rowData)} disabled={rowData.status === "Connecting" || rowData.status === "Disconnected"} >Info, - this.onOpenEditNetworkElementDialog(event, rowData)}>Edit, - !rowData.isRequired - ? this.onOpenAddNetworkElementDialog(event, rowData)} >Add - : this.onOpenRemoveNetworkElementDialog(event, rowData)} >Remove, - , - this.navigateToApplicationHandlerCreator("inventory", rowData)} disabled={rowData.status === "Connecting" || rowData.status === "Disconnected" || !inventory}>Inventory, - , - this.navigateToApplicationHandlerCreator("fault", rowData)} disabled={rowData.status === "Connecting" || rowData.status === "Disconnected" || !fault}>Fault, - this.navigateToApplicationHandlerCreator("configuration", rowData)} disabled={rowData.status === "Connecting" || rowData.status === "Disconnected" || !configuration}>Configure, - this.navigateToApplicationHandlerCreator("accounting", rowData)} disabled={true}>Accounting, - this.navigateToApplicationHandlerCreator("performanceHistory", rowData)} disabled={true}>Performance, - this.navigateToApplicationHandlerCreator("security", rowData)} disabled={true} >Security, - ]; + + return this.getContextMenu(rowData); }} > (event: React.MouseEvent) => { - this.props.navigateToApplication(applicationName, element.nodeId); - } } export const NetworkElementsList = withStyles(styles)(connect(mapProps, mapDispatch)(NetworkElementsListComponent)); -- cgit 1.2.3-korg