Github user iraghumitra commented on a diff in the pull request:

    https://github.com/apache/metron/pull/787#discussion_r143772168
  
    --- Diff: metron-interface/metron-alerts/src/app/service/update.service.ts 
---
    @@ -32,13 +33,31 @@ export class UpdateService {
     
       defaultHeaders = {'Content-Type': 'application/json', 
'X-Requested-With': 'XMLHttpRequest'};
     
    +  alertChangedSource = new Subject<PatchRequest>();
    +  alertChanged$ = this.alertChangedSource.asObservable();
     
       constructor(private http: Http) { }
     
       public patch(patchRequest: PatchRequest): Observable<{}> {
         let url = '/api/v1/update/patch';
    -    return this.http.patch(url, patchRequest, new RequestOptions({headers: 
new Headers(this.defaultHeaders)}))
    -    .catch(HttpUtil.handleError);
    +    let observable = Observable.create((observer => {
    --- End diff --
    
    @merrimanr This is not an anti-pattern as such, we can trigger the event 
from the component that is trying to patch, but it has to be done at all places 
wherever we are patching. In this way there is no such need and list view will 
definitely get intimated of all changes. 
    If you are not comfortable we can change it :)


---

Reply via email to