diff options
author | Aijana Schumann <aijana.schumann@highstreet-technologies.com> | 2020-03-16 09:15:00 +0100 |
---|---|---|
committer | Aijana Schumann <aijana.schumann@highstreet-technologies.com> | 2020-03-16 09:15:00 +0100 |
commit | bc9425a00d19b75b149fbbf0c4ea7345de8721d5 (patch) | |
tree | aeadec5017c40d40f3325ac782150a2f8bd28b8e /sdnr/wt/odlux/apps/performanceHistoryApp/src/views/performanceHistoryApplication.tsx | |
parent | 05da65b2d01a75404059d7526b4cbb868f631dd7 (diff) |
Bugfixes for PerformanceApp
Fix filter in table not always showing
Fix suspectInterval filter not linked between chart and table
Fix data not loaded problem
Issue-ID: SDNC-1118
Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Change-Id: I7d1b71f094dfdd7cd16ed6f7fb5c597a7b209b69
Diffstat (limited to 'sdnr/wt/odlux/apps/performanceHistoryApp/src/views/performanceHistoryApplication.tsx')
-rw-r--r-- | sdnr/wt/odlux/apps/performanceHistoryApp/src/views/performanceHistoryApplication.tsx | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sdnr/wt/odlux/apps/performanceHistoryApp/src/views/performanceHistoryApplication.tsx b/sdnr/wt/odlux/apps/performanceHistoryApp/src/views/performanceHistoryApplication.tsx index 4a1c654fb..f19058cf2 100644 --- a/sdnr/wt/odlux/apps/performanceHistoryApp/src/views/performanceHistoryApplication.tsx +++ b/sdnr/wt/odlux/apps/performanceHistoryApp/src/views/performanceHistoryApplication.tsx @@ -53,6 +53,7 @@ import { MaterialTable, MaterialTableCtorType } from '../../../../framework/src/ import { AppBar, Tabs, Tab } from '@material-ui/core'; import LtpSelection from '../components/ltpSelection'; import { ResetAllSubViewsAction } from '../actions/toggleActions'; +import { ReloadAction } from '../actions/reloadAction'; const PerformanceHistoryComponentStyles = (theme: Theme) => createStyles({ root: { @@ -70,7 +71,8 @@ const mapProps = (state: IApplicationStoreState) => ({ availableLtps: state.performanceHistory.ltps.distinctLtps, networkElements: state.performanceHistory.networkElements.deviceList, initialLoaded: state.performanceHistory.ltps.loadedOnce, - error: state.performanceHistory.ltps.error + error: state.performanceHistory.ltps.error, + shouldReload: state.performanceHistory.isReloadSchedueled }); const mapDispatcher = (dispatcher: IDispatcher) => ({ @@ -105,7 +107,8 @@ const mapDispatcher = (dispatcher: IDispatcher) => ({ dispatch(new NavigateToApplication("performanceHistory", nodeId)); }), resetLtps: () => dispatcher.dispatch((dispatch: Dispatch) => { dispatch(new ResetLtpsAction()); }), - resetSubViews: () => dispatcher.dispatch(new ResetAllSubViewsAction()) + resetSubViews: () => dispatcher.dispatch(new ResetAllSubViewsAction()), + setShouldReload: (show: boolean) => dispatcher.dispatch(new ReloadAction(show)) }); export type NetworkElementType = { @@ -220,7 +223,7 @@ class PerformanceHistoryComponent extends React.Component<PerformanceHistoryComp if (nodeId === "") { return ( <> - <NetworkElementTable stickyHeader title={"Please select the network element!"} idProperty={"nodeId"} rows={this.props.networkElements} asynchronus + <NetworkElementTable defaultSortColumn={"nodeId"} defaultSortOrder="asc" stickyHeader title={"Please select the network element!"} idProperty={"nodeId"} rows={this.props.networkElements} asynchronus onHandleClick={(event, rowData) => { this.handleNetworkElementSelect(rowData.nodeId) }} columns={ [{ property: "nodeId", title: "Node Name" }] } /> @@ -294,17 +297,8 @@ class PerformanceHistoryComponent extends React.Component<PerformanceHistoryComp public componentDidMount() { - this.props.resetSubViews(); - this.props.resetLtps(); this.props.setCurrentPanel(null); this.props.getAllDevicesPMdata(); - this.props.enableFilterPerformanceData.onToggleFilter(); - this.props.enableFilterReceiveLevel.onToggleFilter(); - this.props.enableFilterTransmissionPower.onToggleFilter(); - this.props.enableFilterTemperature.onToggleFilter(); - this.props.enableFilterAdaptiveModulation.onToggleFilter(); - this.props.enableFilterSinr.onToggleFilter(); - this.props.enableFilterCpd.onToggleFilter(); } /** @@ -388,9 +382,8 @@ class PerformanceHistoryComponent extends React.Component<PerformanceHistoryComp private handleURLChange = (selectedNetworkElement: string) => { - if (selectedNetworkElement !== this.state.selectedNetworkElement) { - // gets called if page is reloaded / opened with a networkname in the url, - // not if the selected networkelement is changed + if (this.props.shouldReload) { + this.setState({ showLtps: true, selectedNetworkElement: selectedNetworkElement, @@ -398,6 +391,7 @@ class PerformanceHistoryComponent extends React.Component<PerformanceHistoryComp selectedLtp: "-1" }); this.props.getDistinctLtpsIds(selectedNetworkElement, this.state.selectedTimePeriod, "-1", this.selectFirstLtp); + this.props.setShouldReload(false); } } |