diff options
Diffstat (limited to 'sdnr/wt/odlux/apps/faultApp/src')
3 files changed, 6 insertions, 20 deletions
diff --git a/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts b/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts index 46f92fbef..2ab1da2ed 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts +++ b/sdnr/wt/odlux/apps/faultApp/src/handlers/faultAppRootHandler.ts @@ -30,7 +30,6 @@ import { SetPanelAction } from '../actions/panelChangeActions'; import { IFaultStatus, faultStatusHandler } from './faultStatusHandler'; import { stuckAlarmHandler } from './clearStuckAlarmsHandler'; import { PanelId } from '../models/panelId'; -import { SetPartialUpdatesAction } from '../actions/partialUpdatesAction'; export interface IFaultAppStoreState { currentProblems: ICurrentProblemsState; @@ -38,7 +37,6 @@ export interface IFaultAppStoreState { alarmLogEntries: IAlarmLogEntriesState; currentOpenPanel: PanelId | null; faultStatus: IFaultStatus; - listenForPartialUpdates: boolean; } const currentOpenPanelHandler: IActionHandler<PanelId | null> = (state = null, action) => { @@ -48,13 +46,6 @@ const currentOpenPanelHandler: IActionHandler<PanelId | null> = (state = null, a return state; } -const arePartialUpdatesActiveHandler: IActionHandler<boolean> = (state = false, action) => { - if (action instanceof SetPartialUpdatesAction) { - state = action.isActive; - } - return state; -} - declare module '../../../../framework/src/store/applicationStore' { interface IApplicationStoreState { fault: IFaultAppStoreState; @@ -67,7 +58,6 @@ const actionHandlers = { alarmLogEntries: alarmLogEntriesActionHandler, currentOpenPanel: currentOpenPanelHandler, faultStatus: faultStatusHandler, - listenForPartialUpdates: arePartialUpdatesActiveHandler }; export const faultAppRootHandler = combineActionHandler<IFaultAppStoreState>(actionHandlers); diff --git a/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx b/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx index 06299417d..3715c623e 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx +++ b/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx @@ -140,6 +140,7 @@ export function register() { applicationApi.applicationStoreInitialized.then(store => { store.dispatch(refreshFaultStatusAsyncAction); }); + window.setInterval(() => { applicationApi.applicationStoreInitialized.then(store => { store.dispatch(refreshFaultStatusAsyncAction); diff --git a/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx b/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx index 7b0c23693..0fc7b390e 100644 --- a/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx +++ b/sdnr/wt/odlux/apps/faultApp/src/views/faultApplication.tsx @@ -41,7 +41,6 @@ import Refresh from '@material-ui/icons/Refresh'; import ClearStuckAlarmsDialog, { ClearStuckAlarmsDialogMode } from '../components/clearStuckAlarmsDialog'; import RefreshAlarmLogDialog, { RefreshAlarmLogDialogMode } from '../components/refreshAlarmLogDialog'; import RefreshCurrentProblemsDialog, { RefreshCurrentProblemsDialogMode } from '../components/refreshCurrentProblemsDialog'; -import { SetPartialUpdatesAction } from '../actions/partialUpdatesAction'; const mapProps = (state: IApplicationStoreState) => ({ panelId: state.fault.currentOpenPanel, @@ -58,7 +57,6 @@ const mapDisp = (dispatcher: IDispatcher) => ({ switchActivePanel: (panelId: PanelId) => { dispatcher.dispatch(setPanelAction(panelId)); }, - setPartialUpdates: (active: boolean) => dispatcher.dispatch(new SetPartialUpdatesAction(active)) }); type FaultApplicationComponentProps = RouteComponentProps & Connect<typeof mapProps, typeof mapDisp>; @@ -138,11 +136,11 @@ class FaultApplicationComponent extends React.Component<FaultApplicationComponen render(): JSX.Element { const clearAlarmsAction = { - icon: Sync, tooltip: 'Clear stuck alarms', onClick: this.onDialogOpen + icon: Sync, tooltip: 'Clear stuck alarms', ariaLabel:'clear-stuck-alarms', onClick: this.onDialogOpen }; const refreshCurrentProblemsAction = { - icon: Refresh, tooltip: 'Refresh Current Problems List', onClick: () => { + icon: Refresh, tooltip: 'Refresh Current Problems List', ariaLabel:'refresh', onClick: () => { this.setState({ refreshCurrentProblemsEditorMode: RefreshCurrentProblemsDialogMode.RefreshCurrentProblemsTable }); @@ -150,7 +148,7 @@ class FaultApplicationComponent extends React.Component<FaultApplicationComponen }; const refreshAlarmLogAction = { - icon: Refresh, tooltip: 'Refresh Alarm log table', onClick: () => { + icon: Refresh, tooltip: 'Refresh Alarm log table', ariaLabel:'refresh', onClick: () => { this.setState({ refreshAlarmLogEditorMode: RefreshAlarmLogDialogMode.RefreshAlarmLogTable }); @@ -230,15 +228,12 @@ class FaultApplicationComponent extends React.Component<FaultApplicationComponen }; - componentWillUnmount() { - this.props.setPartialUpdates(false); - } - public componentDidMount() { if (this.props.panelId === null) { //set default tab if none is set this.onToggleTabs("CurrentProblem"); + }else{ + this.onToggleTabs(this.props.panelId); } - this.props.setPartialUpdates(true); } private renderIcon = (props: { rowData: Fault | FaultAlarmNotification }) => { |