/** * ============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 * as React from 'react'; import { MenuItem, Select, FormControl, Typography } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import { LtpIds } from 'models/availableLtps'; import { Loader } from '../../../../framework/src/components/material-ui'; const useStyles = makeStyles(theme => ({ display: { display: "inline-block" }, selectDropdown: { borderRadius: 1, position: "relative", backgroundColor: theme.palette.background.paper, border: "1px solid #ced4da", fontSize: 16, width: "auto", padding: "5px 5px 5px 5px", transition: theme.transitions.create(["border-color", "box-shadow"]), }, center: { "flex": "1", "height": "100%", "display": "flex", "alignItems": "center", "justifyContent": "center", flexDirection: "column" } })); type LtpSelectionProps = { selectedNE: string, error?: string, finishedLoading: boolean, selectedLtp: string, availableLtps: LtpIds[], onChangeLtp(event: React.ChangeEvent): void, selectedTimePeriod: string, onChangeTimePeriod(event: React.ChangeEvent): void }; export const LtpSelection = (props: LtpSelectionProps) => { const classes = useStyles(); return ( <>

Selected Network Element: {props.selectedNE}

Select LTP Time-Period { !props.finishedLoading && !props.error &&

Collecting Data ...

} { props.finishedLoading && props.error &&

Data couldn't be loaded

{props.error}
} { props.selectedLtp === "-1" && props.finishedLoading && !props.error && (props.availableLtps.length > 0 ?

Please select a LTP

:

No performance data found

) } ) } export default LtpSelection;