tiborm commented on a change in pull request #1514: METRON-2190: [UI] Alerts
UI: Indicating loading and preventing parallel requests
URL: https://github.com/apache/metron/pull/1514#discussion_r327003056
##########
File path:
metron-interface/metron-alerts/src/app/alerts/alerts-list/alerts-list.component.ts
##########
@@ -258,11 +289,7 @@ export class AlertsListComponent implements OnInit,
OnDestroy {
alert => (alert.source.metron_alert && alert.source.metron_alert.length
> 0)
);
- if (selectedAlerts.length > 0) {
- this.pause();
- } else {
- this.resume();
- }
+ this.autoPollingSvc.setSuppression(!!selectedAlerts.length);
Review comment:
The concept of suppression was added to auto polling to prevent starting and
sopping it when ever another feature interfere whit it. With this we no longer
resetting the timer, persistent state only turning a flag on and skipping
polling cycles til it's needed. (the list of features suppressing auto polling
is in the pr desc)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services