Github user iraghumitra commented on a diff in the pull request: https://github.com/apache/metron/pull/803#discussion_r146205835 --- Diff: metron-interface/metron-alerts/src/app/service/update.service.ts --- @@ -38,22 +41,27 @@ export class UpdateService { constructor(private http: Http) { } - public patch(patchRequest: PatchRequest): Observable<{}> { + public patch(patchRequest: PatchRequest, fireChangeListner = true): Observable<{}> { let url = '/api/v1/update/patch'; return this.http.patch(url, patchRequest, new RequestOptions({headers: new Headers(this.defaultHeaders)})) .catch(HttpUtil.handleError) .map(result => { - this.alertChangedSource.next(patchRequest); + if (fireChangeListner) { + this.alertChangedSource.next(patchRequest); + } return result; }); } - public updateAlertState(alerts: Alert[], state: string): Observable<{}> { + public updateAlertState(alerts: Alert[], state: string, fireChangeListner = true): Observable<{}> { --- End diff -- It is passed to patch function and is used there. This is specifically needed in the case where we select multiple rows on the table to update the status. There are too many unnecessary find one calls fired.
---