Alarm Journal Table / Alarm Status Table - Loading Time

I want to detect when the alarm journal table or the alarm status table is currently loading the data in order to display a popup instead of the font written on it indicating that no records are found.

Thanks in advance,

The Alarm Status and Alarm Journal components are relatively closed systems. You can always build your own, but for your scenario, that likely has little ROI.

The only access that I can see into knowing when the table is loading data is via the extension functions. However, the purpose here is to allow you to add a custom alarm filter. It runs for every row in the table, not once per dataset.

For Alarm Journal Table, a workaround to manage loading time can be:

On alarm Journal table component:

  • add a custom prop filterAlarmCounter and filterAlarmCounterPrev

  • in FilterAlarm extension fonction add filterAlarmCounter = filterAlarmCounter +1

  • add a custom prop startLoading with an expression structure with all change triggering alarm journal table update. Launch your progress indicator

  • add a custom prop with an expression binding to detect the end of loading:

  • filterAlarmCount

  • filterAlarmCountPrev

  • filterInProgress

now(1000)

if (self.custom.filerAlarmCount != self.custom.filerAlarmCountPrev):
	self.custom.filerAlarmCountPrev = self.custom.filerAlarmCount
	return True
else:
	self.custom.filerAlarmCountPrev = 0
	self.custom.filerAlarmCount = 0
	return False

tag changed script:

if previousValue.value and (currentValue.value == False):
      stop progress indicator
  • startProgress
start progress indicator
nb = query alarm Journal with the filter, priority, etc parameters
if nb == 0:
	stop progress indicator
else:
       message with nb to alarm event filtering...

Note: you have to check the query return data and pass them to filterAlarm extension function.
If your query doesn't return data, so filterAlarm is not called and you need to stop progress indicator.

:warning: Don't use session.custom.prop in filterAlarm extension function, only component's custom property. This results in a substantial degradation in performance.

filter.result.data could be use too to detect the end of loading, but it doesn't works if 2 consecutive request return the same data, or no data...