X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=sdnr%2Fwt%2Fodlux%2Fapps%2FfaultApp%2Fsrc%2FpluginFault.tsx;h=06299417d26f3e4da56bb76832af467c701172d2;hb=7152b77370d1989e4429ce37ec25b1e1baace0da;hp=bf96fe38d3e12e64a0e7e317c765419479dae17a;hpb=6950b473ff100653cf726ce2c3f8fe54a8076cfa;p=ccsdk%2Ffeatures.git diff --git a/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx b/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx index bf96fe38d..06299417d 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx +++ b/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx @@ -42,6 +42,7 @@ import { FaultStatus } from "./components/faultStatus"; import { refreshFaultStatusAsyncAction } from "./actions/statusActions"; let currentMountId: string | undefined = undefined; +let currentSeverity: string | undefined = undefined; const mapProps = (state: IApplicationStoreState) => ({ currentProblemsProperties: createCurrentProblemsProperties(state), @@ -75,8 +76,30 @@ const FaultApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteCom ) }); +const FaulttApplicationAlarmStatusRouteAdapter = connect(mapProps, mapDisp)((props: RouteComponentProps<{ severity?: string }> & Connect) => { + if (currentSeverity !== props.match.params.severity) { + currentSeverity = props.match.params.severity || undefined; + window.setTimeout(() => { + if (currentSeverity) { + props.setCurrentPanel("CurrentProblem"); + props.currentProblemsActions.onFilterChanged("severity", currentSeverity); + if (!props.currentProblemsProperties.showFilter) { + props.currentProblemsActions.onToggleFilter(false); + props.currentProblemsActions.onRefresh(); + } + else + props.currentProblemsActions.onRefresh(); + } + }); + } + return ( + + ) +}); + const App = withRouter((props: RouteComponentProps) => ( +