From 45bf787f75acb67d4153be40480b07f48ded4d17 Mon Sep 17 00:00:00 2001 From: sai-neetha Date: Mon, 12 Aug 2019 18:17:46 +0200 Subject: Minor functional fixes in odlux apps Minor functional fixes in odlux apps Issue-ID: SDNC-845 Signed-off-by: sai-neetha Change-Id: I8e64e7c67a21798832ad1a36441b08a070452034 Signed-off-by: sai-neetha --- .../src/components/adaptiveModulation.tsx | 119 +++++++++++---------- .../src/components/crossPolarDiscrimination.tsx | 54 ++++++---- .../src/components/performanceData.tsx | 46 ++++---- .../src/components/receiveLevel.tsx | 52 +++++---- .../src/components/signalToInterference.tsx | 55 ++++++---- .../src/components/temperature.tsx | 54 ++++++---- .../src/components/transmissionPower.tsx | 54 ++++++---- 7 files changed, 251 insertions(+), 183 deletions(-) (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src/components') diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/adaptiveModulation.tsx b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/adaptiveModulation.tsx index 281ee2f8d..2564d574a 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/adaptiveModulation.tsx +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/adaptiveModulation.tsx @@ -1,3 +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========================================================================== + */ import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; @@ -8,19 +25,16 @@ import connect, { Connect, IDispatcher } from '../../../../framework/src/flux/co import { AdaptiveModulationDataType } from '../models/adaptiveModulationDataType'; import { IDataSet, IDataSetsObject } from '../models/chartTypes'; -import { createAdaptiveModulation15minProperties, createAdaptiveModulation15minActions } from '../handlers/adaptiveModulation15minHandler'; -import { createAdaptiveModulation24hoursProperties, createAdaptiveModulation24hoursActions } from '../handlers/adaptiveModulation24hoursHandler'; +import { createAdaptiveModulationProperties, createAdaptiveModulationActions } from '../handlers/adaptiveModulationHandler'; import { lineChart, sortDataByTimeStamp } from '../utils/chartUtils'; import { addColumnLabels } from '../utils/tableUtils'; const mapProps = (state: IApplicationStoreState) => ({ - adaptiveModulation15minProperties: createAdaptiveModulation15minProperties(state), - adaptiveModulation24hoursProperties: createAdaptiveModulation24hoursProperties(state) + adaptiveModulationProperties: createAdaptiveModulationProperties(state), }); const mapDisp = (dispatcher: IDispatcher) => ({ - adaptiveModulation15minActions: createAdaptiveModulation15minActions(dispatcher.dispatch), - adaptiveModulation24hoursActions: createAdaptiveModulation24hoursActions(dispatcher.dispatch) + adaptiveModulationActions: createAdaptiveModulationActions(dispatcher.dispatch), }); type AdaptiveModulationComponentProps = RouteComponentProps & Connect & { @@ -34,22 +48,17 @@ const AdaptiveModulationTable = MaterialTable as MaterialTableCtorType{ render(): JSX.Element { - const properties = this.props.selectedTimePeriod === "15min" - ? this.props.adaptiveModulation15minProperties - : this.props.adaptiveModulation24hoursProperties; - - const actions = this.props.selectedTimePeriod === "15min" - ? this.props.adaptiveModulation15minActions - : this.props.adaptiveModulation24hoursActions; + const properties = this.props.adaptiveModulationProperties; + const actions = this.props.adaptiveModulationActions; const chartPagedData = this.getChartDataValues(properties.rows); const adaptiveModulationColumns: ColumnModel[] = [ - { property: "radio-signal-id", title: "Radio signal", type: ColumnType.text }, - { property: "scanner-id", title: "Scanner ID", type: ColumnType.text }, - { property: "time-stamp", title: "End Time", type: ColumnType.text, disableFilter: true }, + { property: "radioSignalId", title: "Radio signal", type: ColumnType.text }, + { property: "scannerId", title: "Scanner ID", type: ColumnType.text }, + { property: "utcTimeStamp", title: "End Time", type: ColumnType.text, disableFilter: true }, { - property: "suspect-interval-flag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { - const suspectIntervalFlag = rowData["suspect-interval-flag"].toString(); + property: "suspectIntervalFlag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { + const suspectIntervalFlag = rowData["suspectIntervalFlag"].toString(); return
{suspectIntervalFlag}
} }]; @@ -76,7 +85,7 @@ class AdaptiveModulationComponent extends React.Component { datasets.forEach(ds => { ds.data.push({ - x: row["time-stamp"], + x: row["utcTimeStamp" as keyof AdaptiveModulationDataType] as string, y: row[ds.name as keyof AdaptiveModulationDataType] as string }); }); diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/crossPolarDiscrimination.tsx b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/crossPolarDiscrimination.tsx index 42e3f93a6..8718171f7 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/crossPolarDiscrimination.tsx +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/crossPolarDiscrimination.tsx @@ -1,3 +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========================================================================== + */ import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; @@ -8,19 +25,16 @@ import connect, { Connect, IDispatcher } from '../../../../framework/src/flux/co import { CrossPolarDiscriminationDataType } from '../models/crossPolarDiscriminationDataType'; import { IDataSet, IDataSetsObject } from '../models/chartTypes'; -import { createCrossPolarDiscrimination15minProperties, createCrossPolarDiscrimination15minActions } from '../handlers/crossPolarDiscrimination15minHandler'; -import { createCrossPolarDiscrimination24hoursProperties, createCrossPolarDiscrimination24hoursActions } from '../handlers/crossPolarDiscrimination24hoursHandler'; +import { createCrossPolarDiscriminationProperties, createCrossPolarDiscriminationActions } from '../handlers/crossPolarDiscriminationHandler'; import { lineChart, sortDataByTimeStamp } from '../utils/chartUtils'; import { addColumnLabels } from '../utils/tableUtils'; const mapProps = (state: IApplicationStoreState) => ({ - crossPolarDiscrimination15minProperties: createCrossPolarDiscrimination15minProperties(state), - crossPolarDiscrimination24hoursProperties: createCrossPolarDiscrimination24hoursProperties(state) + crossPolarDiscriminationProperties: createCrossPolarDiscriminationProperties(state), }); const mapDisp = (dispatcher: IDispatcher) => ({ - crossPolarDiscrimination15minActions: createCrossPolarDiscrimination15minActions(dispatcher.dispatch), - crossPolarDiscrimination24hoursActions: createCrossPolarDiscrimination24hoursActions(dispatcher.dispatch) + crossPolarDiscriminationActions: createCrossPolarDiscriminationActions(dispatcher.dispatch), }); type CrossPolarDiscriminationComponentProps = RouteComponentProps & Connect & { @@ -34,27 +48,23 @@ const CrossPolarDiscriminationTable = MaterialTable as MaterialTableCtorType{ render(): JSX.Element { - const properties = this.props.selectedTimePeriod === "15min" - ? this.props.crossPolarDiscrimination15minProperties - : this.props.crossPolarDiscrimination24hoursProperties; - const actions = this.props.selectedTimePeriod === "15min" - ? this.props.crossPolarDiscrimination15minActions - : this.props.crossPolarDiscrimination24hoursActions; + const properties = this.props.crossPolarDiscriminationProperties; + const actions = this.props.crossPolarDiscriminationActions; const chartPagedData = this.getChartDataValues(properties.rows); const cpdColumns: ColumnModel[] = [ - { property: "radio-signal-id", title: "Radio signal", type: ColumnType.text }, - { property: "scanner-id", title: "Scanner ID", type: ColumnType.text }, - { property: "time-stamp", title: "End Time", type: ColumnType.text, disableFilter: true }, + { property: "radioSignalId", title: "Radio signal", type: ColumnType.text }, + { property: "scannerId", title: "Scanner ID", type: ColumnType.text }, + { property: "utcTimeStamp", title: "End Time", type: ColumnType.text, disableFilter: true }, { - property: "suspect-interval-flag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { - const suspectIntervalFlag = rowData["suspect-interval-flag"].toString(); + property: "suspectIntervalFlag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { + const suspectIntervalFlag = rowData["suspectIntervalFlag"].toString(); return
{suspectIntervalFlag}
} } ]; - + chartPagedData.datasets.forEach(ds => { cpdColumns.push(addColumnLabels(ds.name, ds.columnLabel)); }); @@ -75,7 +85,7 @@ class CrossPolarDiscriminationComponent extends React.Component { datasets.forEach(ds => { ds.data.push({ - x: row["time-stamp"], + x: row["utcTimeStamp" as keyof CrossPolarDiscriminationDataType] as string, y: row[ds.name as keyof CrossPolarDiscriminationDataType] as string }); }); diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/performanceData.tsx b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/performanceData.tsx index 578022db7..fc44879dc 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/performanceData.tsx +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/performanceData.tsx @@ -1,3 +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========================================================================== + */ import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; @@ -7,19 +24,16 @@ import { IApplicationStoreState } from '../../../../framework/src/store/applicat import connect, { Connect, IDispatcher } from '../../../../framework/src/flux/connect'; import { PerformanceDataType } from '../models/performanceDataType'; import { IDataSet, IDataSetsObject } from '../models/chartTypes'; -import { createPerformanceData15minProperties, createPerformanceData15minActions } from '../handlers/performanceData15minHandler'; -import { createPerformanceData24hoursProperties, createPerformanceData24hoursActions } from '../handlers/performanceData24hoursHandler'; +import { createPerformanceDataProperties, createPerformanceDataActions } from '../handlers/performanceDataHandler'; import { lineChart, sortDataByTimeStamp } from '../utils/chartUtils'; import { addColumnLabels } from '../utils/tableUtils'; const mapProps = (state: IApplicationStoreState) => ({ - performanceData15minProperties: createPerformanceData15minProperties(state), - performanceData24hoursProperties: createPerformanceData24hoursProperties(state) + performanceDataProperties: createPerformanceDataProperties(state), }); const mapDisp = (dispatcher: IDispatcher) => ({ - performanceData15minActions: createPerformanceData15minActions(dispatcher.dispatch), - performanceData24hoursActions: createPerformanceData24hoursActions(dispatcher.dispatch) + performanceDataActions: createPerformanceDataActions(dispatcher.dispatch), }); type PerformanceDataComponentProps = RouteComponentProps & Connect & { @@ -33,21 +47,17 @@ const PerformanceDataTable = MaterialTable as MaterialTableCtorType{ render(): JSX.Element { - const properties = this.props.selectedTimePeriod === "15min" - ? this.props.performanceData15minProperties - : this.props.performanceData24hoursProperties; - const actions = this.props.selectedTimePeriod === "15min" - ? this.props.performanceData15minActions - : this.props.performanceData24hoursActions; + const properties = this.props.performanceDataProperties; + const actions = this.props.performanceDataActions; const chartPagedData = this.getChartDataValues(properties.rows); const performanceColumns: ColumnModel[] = [ - { property: "radio-signal-id", title: "Radio signal", type: ColumnType.text }, - { property: "scanner-id", title: "Scanner ID", type: ColumnType.text }, - { property: "time-stamp", title: "End Time", type: ColumnType.text, disableFilter: true }, + { property: "radioSignalId", title: "Radio signal", type: ColumnType.text }, + { property: "scannerId", title: "Scanner ID", type: ColumnType.text }, + { property: "utcTimeStamp", title: "End Time", type: ColumnType.text, disableFilter: true }, { - property: "suspect-interval-flag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { - const suspectIntervalFlag = rowData["suspect-interval-flag"].toString(); + property: "suspectIntervalFlag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { + const suspectIntervalFlag = rowData["suspectIntervalFlag"].toString(); return
{suspectIntervalFlag}
} } @@ -104,7 +114,7 @@ class PerformanceDataComponent extends React.Component { datasets.forEach(ds => { ds.data.push({ - x: row["time-stamp"], + x: row["utcTimeStamp" as keyof PerformanceDataType] as string, y: row[ds.name as keyof PerformanceDataType] as string }); }); diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/receiveLevel.tsx b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/receiveLevel.tsx index b893ce149..9992f5bd8 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/receiveLevel.tsx +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/receiveLevel.tsx @@ -1,3 +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========================================================================== + */ import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; @@ -8,19 +25,16 @@ import connect, { Connect, IDispatcher } from '../../../../framework/src/flux/co import { ReceiveLevelDataType } from '../models/receiveLevelDataType'; import { IDataSet, IDataSetsObject } from '../models/chartTypes'; -import { createReceiveLevel15minProperties, createReceiveLevel15minActions } from '../handlers/receiveLevel15minHandler'; -import { createReceiveLevel24hoursProperties, createReceiveLevel24hoursActions } from '../handlers/receiveLevel24hoursHandler'; +import { createReceiveLevelProperties, createReceiveLevelActions } from '../handlers/receiveLevelHandler'; import { lineChart, sortDataByTimeStamp } from '../utils/chartUtils'; import { addColumnLabels } from '../utils/tableUtils'; const mapProps = (state: IApplicationStoreState) => ({ - receiveLevel15minProperties: createReceiveLevel15minProperties(state), - receiveLevel24hoursProperties: createReceiveLevel24hoursProperties(state) + receiveLevelProperties: createReceiveLevelProperties(state), }); const mapDisp = (dispatcher: IDispatcher) => ({ - receiveLevel15minActions: createReceiveLevel15minActions(dispatcher.dispatch), - receiveLevel24hoursActions: createReceiveLevel24hoursActions(dispatcher.dispatch) + receiveLevelActions: createReceiveLevelActions(dispatcher.dispatch), }); type ReceiveLevelComponentProps = RouteComponentProps & Connect & { @@ -34,21 +48,17 @@ const ReceiveLevelTable = MaterialTable as MaterialTableCtorType{ render(): JSX.Element { - const properties = this.props.selectedTimePeriod === "15min" - ? this.props.receiveLevel15minProperties - : this.props.receiveLevel24hoursProperties; - const actions = this.props.selectedTimePeriod === "15min" - ? this.props.receiveLevel15minActions - : this.props.receiveLevel24hoursActions; + const properties = this.props.receiveLevelProperties; + const actions = this.props.receiveLevelActions; const chartPagedData = this.getChartDataValues(properties.rows); const receiveLevelColumns: ColumnModel[] = [ - { property: "radio-signal-id", title: "Radio signal", type: ColumnType.text }, - { property: "scanner-id", title: "Scanner ID", type: ColumnType.text }, - { property: "time-stamp", title: "End Time", type: ColumnType.text, disableFilter: true }, + { property: "radioSignalId", title: "Radio signal", type: ColumnType.text }, + { property: "scannerId", title: "Scanner ID", type: ColumnType.text }, + { property: "utcTimeStamp", title: "End Time", type: ColumnType.text, disableFilter: true }, { - property: "suspect-interval-flag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { - const suspectIntervalFlag = rowData["suspect-interval-flag"].toString(); + property: "suspectIntervalFlag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { + const suspectIntervalFlag = rowData["suspectIntervalFlag"].toString(); return
{suspectIntervalFlag}
} } @@ -75,7 +85,7 @@ class ReceiveLevelComponent extends React.Component{ sortDataByTimeStamp(_rows); const datasets: IDataSet[] = [{ - name: "rx-level-min", + name: "rxLevelMin", label: "rx-level-min", borderColor: '#0e17f3de', bezierCurve: false, @@ -84,7 +94,7 @@ class ReceiveLevelComponent extends React.Component{ data: [], columnLabel: "Rx min" }, { - name: "rx-level-avg", + name: "rxLevelAvg", label: "rx-level-avg", borderColor: '#08edb6de', bezierCurve: false, @@ -93,7 +103,7 @@ class ReceiveLevelComponent extends React.Component{ data: [], columnLabel: "Rx avg" }, { - name: "rx-level-max", + name: "rxLevelMax", label: "rx-level-max", borderColor: '#b308edde', bezierCurve: false, @@ -106,7 +116,7 @@ class ReceiveLevelComponent extends React.Component{ _rows.forEach(row => { datasets.forEach(ds => { ds.data.push({ - x: row["time-stamp"], + x: row["utcTimeStamp" as keyof ReceiveLevelDataType] as string, y: row[ds.name as keyof ReceiveLevelDataType] as string }); }); diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/signalToInterference.tsx b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/signalToInterference.tsx index 90ed1a9cb..98017ae2f 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/signalToInterference.tsx +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/signalToInterference.tsx @@ -1,3 +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========================================================================== + */ import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; @@ -8,19 +25,16 @@ import connect, { Connect, IDispatcher } from '../../../../framework/src/flux/co import { SignalToInterferenceDataType } from '../models/signalToInteferenceDataType'; import { IDataSet, IDataSetsObject } from '../models/chartTypes'; -import { createSignalToInterference15minProperties, createSignalToInterference15minActions } from '../handlers/signalToInterference15minHandler'; -import { createSignalToInterference24hoursProperties, createSignalToInterference24hoursActions } from '../handlers/signalToInterference24hoursHandler'; +import { createSignalToInterferenceProperties, createSignalToInterferenceActions } from '../handlers/signalToInterferenceHandler'; import { lineChart, sortDataByTimeStamp } from '../utils/chartUtils'; import { addColumnLabels } from '../utils/tableUtils'; const mapProps = (state: IApplicationStoreState) => ({ - signalToInterference15minProperties: createSignalToInterference15minProperties(state), - signalToInterference24hoursProperties: createSignalToInterference24hoursProperties(state) + signalToInterferenceProperties: createSignalToInterferenceProperties(state), }); const mapDisp = (dispatcher: IDispatcher) => ({ - signalToInterference15minActions: createSignalToInterference15minActions(dispatcher.dispatch), - signalToInterference24hoursActions: createSignalToInterference24hoursActions(dispatcher.dispatch) + signalToInterferenceActions: createSignalToInterferenceActions(dispatcher.dispatch), }); type SignalToInterferenceComponentProps = RouteComponentProps & Connect & { @@ -34,28 +48,23 @@ const SignalToInterferenceTable = MaterialTable as MaterialTableCtorType{ render(): JSX.Element { - const properties = this.props.selectedTimePeriod === "15min" - ? this.props.signalToInterference15minProperties - : this.props.signalToInterference24hoursProperties; - const actions = this.props.selectedTimePeriod === "15min" - ? this.props.signalToInterference15minActions - : this.props.signalToInterference24hoursActions; + const properties = this.props.signalToInterferenceProperties; + const actions = this.props.signalToInterferenceActions; const chartPagedData = this.getChartDataValues(properties.rows); const sinrColumns: ColumnModel[] = [ - - { property: "radio-signal-id", title: "Radio signal", type: ColumnType.text }, - { property: "scanner-id", title: "Scanner ID", type: ColumnType.text }, - { property: "time-stamp", title: "End Time", type: ColumnType.text, disableFilter: true }, + { property: "radioSignalId", title: "Radio signal", type: ColumnType.text }, + { property: "scannerId", title: "Scanner ID", type: ColumnType.text }, + { property: "utcTimeStamp", title: "End Time", type: ColumnType.text, disableFilter: true }, { - property: "suspect-interval-flag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { - const suspectIntervalFlag = rowData["suspect-interval-flag"].toString(); + property: "suspectIntervalFlag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { + const suspectIntervalFlag = rowData["suspectIntervalFlag"].toString(); return
{suspectIntervalFlag}
} } ]; - + chartPagedData.datasets.forEach(ds => { sinrColumns.push(addColumnLabels(ds.name, ds.columnLabel)); }); @@ -78,7 +87,7 @@ class SignalToInterferenceComponent extends React.Component { datasets.forEach(ds => { ds.data.push({ - x: row["time-stamp"], + x: row["utcTimeStamp" as keyof SignalToInterferenceDataType] as string, y: row[ds.name as keyof SignalToInterferenceDataType] as string }); }); diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/temperature.tsx b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/temperature.tsx index f105bfd46..f1e62cf33 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/temperature.tsx +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/temperature.tsx @@ -1,3 +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========================================================================== + */ import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; @@ -8,19 +25,16 @@ import connect, { Connect, IDispatcher } from '../../../../framework/src/flux/co import { TemperatureDataType } from '../models/temperatureDataType'; import { IDataSet, IDataSetsObject } from '../models/chartTypes'; -import { createTemperature15minProperties, createTemperature15minActions } from '../handlers/temperature15minHandler'; -import { createTemperature24hoursProperties, createTemperature24hoursActions } from '../handlers/temperature24hoursHandler'; +import { createTemperatureProperties, createTemperatureActions } from '../handlers/temperatureHandler'; import { lineChart, sortDataByTimeStamp } from '../utils/chartUtils'; import { addColumnLabels } from '../utils/tableUtils'; const mapProps = (state: IApplicationStoreState) => ({ - temperature15minProperties: createTemperature15minProperties(state), - temperature24hoursProperties: createTemperature24hoursProperties(state) + temperatureProperties: createTemperatureProperties(state), }); const mapDisp = (dispatcher: IDispatcher) => ({ - temperature15minActions: createTemperature15minActions(dispatcher.dispatch), - temperature24hoursActions: createTemperature24hoursActions(dispatcher.dispatch) + temperatureActions: createTemperatureActions(dispatcher.dispatch), }); type TemperatureComponentProps = RouteComponentProps & Connect & { @@ -34,26 +48,22 @@ const TemperatureTable = MaterialTable as MaterialTableCtorType{ render(): JSX.Element { - const properties = this.props.selectedTimePeriod === "15min" - ? this.props.temperature15minProperties - : this.props.temperature24hoursProperties; - const actions = this.props.selectedTimePeriod === "15min" - ? this.props.temperature15minActions - : this.props.temperature24hoursActions; + const properties = this.props.temperatureProperties; + const actions = this.props.temperatureActions; const chartPagedData = this.getChartDataValues(properties.rows); const temperatureColumns: ColumnModel[] = [ - { property: "radio-signal-id", title: "Radio signal", type: ColumnType.text }, - { property: "scanner-id", title: "Scanner ID", type: ColumnType.text }, - { property: "time-stamp", title: "End Time", type: ColumnType.text, disableFilter: true }, + { property: "radioSignalId", title: "Radio signal", type: ColumnType.text }, + { property: "scannerId", title: "Scanner ID", type: ColumnType.text }, + { property: "utcTimeStamp", title: "End Time", type: ColumnType.text, disableFilter: true }, { - property: "suspect-interval-flag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { - const suspectIntervalFlag = rowData["suspect-interval-flag"].toString(); + property: "suspectIntervalFlag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { + const suspectIntervalFlag = rowData["suspectIntervalFlag"].toString(); return
{suspectIntervalFlag}
} } ]; - + chartPagedData.datasets.forEach(ds => { temperatureColumns.push(addColumnLabels(ds.name, ds.columnLabel)); }); @@ -75,7 +85,7 @@ class TemperatureComponent extends React.Component{ sortDataByTimeStamp(_rows); const datasets: IDataSet[] = [{ - name: "rf-temp-min", + name: "rfTempMin", label: "rf-temp-min", borderColor: '#0e17f3de', bezierCurve: false, @@ -84,7 +94,7 @@ class TemperatureComponent extends React.Component{ data: [], columnLabel: "Rf Temp Min[deg C]" }, { - name: "rf-temp-avg", + name: "rfTempAvg", label: "rf-temp-avg", borderColor: '#08edb6de', bezierCurve: false, @@ -93,7 +103,7 @@ class TemperatureComponent extends React.Component{ data: [], columnLabel: "Rf Temp Avg[deg C]" }, { - name: "rf-temp-max", + name: "rfTempMax", label: "rf-temp-max", borderColor: '#b308edde', bezierCurve: false, @@ -106,7 +116,7 @@ class TemperatureComponent extends React.Component{ _rows.forEach(row => { datasets.forEach(ds => { ds.data.push({ - x: row["time-stamp"], + x: row["utcTimeStamp" as keyof TemperatureDataType] as string, y: row[ds.name as keyof TemperatureDataType] as string }); }); diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/transmissionPower.tsx b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/transmissionPower.tsx index 088a83eed..8ec4561a4 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/transmissionPower.tsx +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/components/transmissionPower.tsx @@ -1,3 +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========================================================================== + */ import * as React from 'react'; import { withRouter, RouteComponentProps } from 'react-router-dom'; @@ -8,19 +25,16 @@ import connect, { Connect, IDispatcher } from '../../../../framework/src/flux/co import { TransmissionPowerDataType } from '../models/transmissionPowerDataType'; import { IDataSet, IDataSetsObject } from '../models/chartTypes'; -import { createTransmissionPower15minProperties, createTransmissionPower15minActions } from '../handlers/transmissionPower15minHandler'; -import { createTransmissionPower24hoursProperties, createTransmissionPower24hoursActions } from '../handlers/transmissionPower24hoursHandler'; +import { createTransmissionPowerProperties, createTransmissionPowerActions } from '../handlers/transmissionPowerHandler'; import { lineChart, sortDataByTimeStamp } from '../utils/chartUtils'; import { addColumnLabels } from '../utils/tableUtils'; const mapProps = (state: IApplicationStoreState) => ({ - transmissionPower15minProperties: createTransmissionPower15minProperties(state), - transmissionPower24hoursProperties: createTransmissionPower24hoursProperties(state) + transmissionPowerProperties: createTransmissionPowerProperties(state), }); const mapDisp = (dispatcher: IDispatcher) => ({ - transmissionPower15minActions: createTransmissionPower15minActions(dispatcher.dispatch), - transmissionPower24hoursActions: createTransmissionPower24hoursActions(dispatcher.dispatch) + transmissionPowerActions: createTransmissionPowerActions(dispatcher.dispatch), }); type TransmissionPowerComponentProps = RouteComponentProps & Connect & { @@ -34,27 +48,23 @@ const TransmissionPowerTable = MaterialTable as MaterialTableCtorType{ render(): JSX.Element { - const properties = this.props.selectedTimePeriod === "15min" - ? this.props.transmissionPower15minProperties - : this.props.transmissionPower24hoursProperties; - const actions = this.props.selectedTimePeriod === "15min" - ? this.props.transmissionPower15minActions - : this.props.transmissionPower24hoursActions; + const properties = this.props.transmissionPowerProperties + const actions = this.props.transmissionPowerActions const chartPagedData = this.getChartDataValues(properties.rows); const transmissionColumns: ColumnModel[] = [ - { property: "radio-signal-id", title: "Radio signal", type: ColumnType.text }, - { property: "scanner-id", title: "Scanner ID", type: ColumnType.text }, - { property: "time-stamp", title: "End Time", type: ColumnType.text, disableFilter: true }, + { property: "radioSignalId", title: "Radio signal", type: ColumnType.text }, + { property: "scannerId", title: "Scanner ID", type: ColumnType.text }, + { property: "utcTimeStamp", title: "End Time", type: ColumnType.text, disableFilter: true }, { - property: "suspect-interval-flag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { - const suspectIntervalFlag = rowData["suspect-interval-flag"].toString(); + property: "suspectIntervalFlag", title: "Suspect Interval", type: ColumnType.custom, customControl: ({ rowData }) => { + const suspectIntervalFlag = rowData["suspectIntervalFlag"].toString(); return
{suspectIntervalFlag}
} } ]; - + chartPagedData.datasets.forEach(ds => { transmissionColumns.push(addColumnLabels(ds.name, ds.columnLabel)); }); @@ -77,7 +87,7 @@ class TransmissionPowerComponent extends React.Component { datasets.forEach(ds => { ds.data.push({ - x: row["time-stamp"], + x: row["utcTimeStamp" as keyof TransmissionPowerDataType] as string, y: row[ds.name as keyof TransmissionPowerDataType] as string }); }); -- cgit 1.2.3-korg