From 1a868116614dd9996c78e69941b537e9da19460b Mon Sep 17 00:00:00 2001 From: Aijana Schumann Date: Tue, 1 Feb 2022 13:18:42 +0100 Subject: Update ODLUX Updated to Material-ui 5, updated dashboard view, removed NetworkMap, LinkCalculator and LineOfSightApp, small bugfixes Issue-ID: CCSDK-3580 Signed-off-by: Aijana Schumann Change-Id: Id0fc148673e23a755cafc2be1c489248c38ff47c --- .../configurationApp/src/actions/deviceActions.ts | 22 +++++- .../src/components/ifWhenTextInput.tsx | 25 +++++-- .../src/components/uiElementBoolean.tsx | 6 +- .../src/components/uiElementLeafList.tsx | 21 +++--- .../src/components/uiElementNumber.tsx | 4 +- .../src/components/uiElementReference.tsx | 9 ++- .../src/components/uiElementSelection.tsx | 8 +-- .../src/components/uiElementString.tsx | 4 +- .../src/components/uiElementUnion.tsx | 4 +- .../configurationApp/src/pluginConfiguration.tsx | 2 +- .../configurationApp/src/services/yangService.ts | 2 +- .../src/views/configurationApplication.tsx | 78 ++++++++++++---------- 12 files changed, 115 insertions(+), 70 deletions(-) (limited to 'sdnr/wt/odlux/apps/configurationApp/src') diff --git a/sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts b/sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts index ac8aa0ac2..0dd42e3b7 100644 --- a/sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts +++ b/sdnr/wt/odlux/apps/configurationApp/src/actions/deviceActions.ts @@ -1,3 +1,21 @@ +/** + * ============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 { Action } from '../../../../framework/src/flux/action'; import { Dispatch } from '../../../../framework/src/flux/store'; import { IApplicationStoreState } from "../../../../framework/src/store/applicationStore"; @@ -9,7 +27,7 @@ import { restService } from "../services/restServices"; import { YangParser } from "../yang/yangParser"; import { Module } from "../models/yang"; import { ViewSpecification, ViewElement, isViewElementReference, isViewElementList, isViewElementObjectOrList, isViewElementRpc, isViewElementChoise, ViewElementChoiseCase, ViewElementString } from "../models/uiModels"; -import { exception } from 'console'; + export class EnableValueSelector extends Action { constructor(public listSpecification: ViewSpecification, public listData: any[], public keyProperty: string, public onValueSelected : (value: any) => void ) { @@ -570,7 +588,7 @@ export const updateDataActionAsyncCreator = (vPath: string, data: any) => async } if (isNew) { - return dispatch(new ReplaceAction(`/configuration/${nodeId}/${vPath.replace(/\[\]$/i, `[${isNew}]`)}`)) // navigate to new element + return dispatch(new ReplaceAction(`/configuration/${nodeId}/${vPath.replace(/\[\]$/i, `[${isNew}]`)}`)); // navigate to new element } // create display specification diff --git a/sdnr/wt/odlux/apps/configurationApp/src/components/ifWhenTextInput.tsx b/sdnr/wt/odlux/apps/configurationApp/src/components/ifWhenTextInput.tsx index 56ec8dfd0..8ce3106a6 100644 --- a/sdnr/wt/odlux/apps/configurationApp/src/components/ifWhenTextInput.tsx +++ b/sdnr/wt/odlux/apps/configurationApp/src/components/ifWhenTextInput.tsx @@ -17,11 +17,26 @@ */ import { ViewElementBase } from "models/uiModels"; -import { TextField, InputAdornment, Input, Tooltip, Divider, IconButton, InputBase, Paper, makeStyles, Theme, createStyles, FormControl, InputLabel, FormHelperText } from "@material-ui/core"; +import { + TextField, + InputAdornment, + Input, + Tooltip, + Divider, + IconButton, + InputBase, + Paper, + Theme, + FormControl, + InputLabel, + FormHelperText, +} from "@mui/material"; +import makeStyles from '@mui/styles/makeStyles'; +import createStyles from '@mui/styles/createStyles'; import * as React from 'react'; import { faAdjust } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { InputProps } from "@material-ui/core/Input"; +import { InputProps } from "@mui/material/Input"; const useStyles = makeStyles((theme: Theme) => createStyles({ @@ -54,7 +69,7 @@ export const IfWhenTextInput = (props: IfwhenProps) => { const ifFeature = element.ifFeature ? ( - props.onChangeTooltipVisuability(false)} onMouseOut={e => props.onChangeTooltipVisuability(true)} title={element.ifFeature}> + props.onChangeTooltipVisuability(false)} onMouseOut={e => props.onChangeTooltipVisuability(true)} title={element.ifFeature}> @@ -64,7 +79,7 @@ export const IfWhenTextInput = (props: IfwhenProps) => { const whenFeature = element.when ? ( - props.onChangeTooltipVisuability(false)} onMouseOut={() => props.onChangeTooltipVisuability(true)} title={element.when}> + props.onChangeTooltipVisuability(false)} onMouseOut={() => props.onChangeTooltipVisuability(true)} title={element.when}> @@ -73,7 +88,7 @@ export const IfWhenTextInput = (props: IfwhenProps) => { : null; return ( - + {label} {ifFeature}{whenFeature}} {...otherProps} /> {errorText} diff --git a/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementBoolean.tsx b/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementBoolean.tsx index 081ec46e8..81c9d6dcd 100644 --- a/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementBoolean.tsx +++ b/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementBoolean.tsx @@ -17,7 +17,7 @@ */ import * as React from "react" -import { MenuItem, FormHelperText, Select, FormControl, InputLabel } from "@material-ui/core"; +import { MenuItem, FormHelperText, Select, FormControl, InputLabel } from "@mui/material"; import { ViewElementBoolean } from "../models/uiModels"; import { BaseProps } from "./baseProps"; @@ -32,9 +32,9 @@ export const UiElementBoolean = (props: BooleanInputProps) => { const mandetoryError = element.mandatory && value !== 'true' && value !== 'false'; return (!props.readOnly || element.id != null - ? ( + ? ( {element.label} - { props.onChange(e.target.value as string) }} @@ -50,7 +50,7 @@ export const UiElementSelection = (props: selectionProps) => { }} > {element.options.map(option => ( -
{option.key}
+
{option.key}
))} {error} diff --git a/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementString.tsx b/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementString.tsx index f87b94f1d..4908c41aa 100644 --- a/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementString.tsx +++ b/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementString.tsx @@ -17,7 +17,7 @@ */ import * as React from "react" -import { Tooltip, TextField } from "@material-ui/core"; +import { Tooltip, TextField } from "@mui/material"; import { ViewElementString } from "../models/uiModels"; import { BaseProps } from "./baseProps"; import { IfWhenTextInput } from "./ifWhenTextInput"; @@ -68,7 +68,7 @@ export const UiElementString = (props: stringEntryProps) => { } return ( - + { } }; - return + return - + {uiElement.label} -