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_r326998004
 
 

 ##########
 File path: 
metron-interface/metron-alerts/src/app/alerts/alerts-list/alerts-list.component.ts
 ##########
 @@ -99,17 +108,23 @@ export class AlertsListComponent implements OnInit, 
OnDestroy {
               private metaAlertsService: MetaAlertService,
               private globalConfigService: GlobalConfigService,
               private dialogService: DialogService,
+              private cdRef: ChangeDetectorRef,
               public queryBuilder: QueryBuilder,
-              private cdRef: ChangeDetectorRef) {
+              public autoPollingSvc: AutoPollingService) {
     router.events.subscribe(event => {
       if (event instanceof NavigationStart && event.url === '/alerts-list') {
         this.selectedAlerts = [];
-        this.restoreRefreshState();
+        this.restoreAutoPollingState();
       }
     });
+
+    autoPollingSvc.data.subscribe((result: SearchResponse) => {
+      this.setData(result);
+      this.staleDataState = false;
+    })
 
 Review comment:
   I was separating auto polling from normal search to distinguish timer and 
user triggered queries The output of auto polling is now an observable. 

----------------------------------------------------------------
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

Reply via email to