Tibor Meller created METRON-1842: ------------------------------------ Summary: PCAP UI: Implementing proper reactive event handling in PCAP Key: METRON-1842 URL: https://issues.apache.org/jira/browse/METRON-1842 Project: Metron Issue Type: Improvement Reporter: Tibor Meller
TheĀ current implementation gives no chance to handle events in a reactive way. In my opinion, our real streamsĀ in PCAP panel are the following: * the stream of clicks on query button (leads to a request) * the stream of clicks on the cancel button (leads to a cancel request) The following three belongs to the PCAP service and consumed by the panel: * the stream of PCAP values (leads to rendering table) * a stream of status changes (leads to updating several UI controls) * a stream of percentages (leads to updating progress bar) We only want to unsubscribe from these streams when the user navigates away to the alert tab. If an error occurs, the job fails, user click cancel we like to continue observing them. Unfortunately, the current implementation creates new observables on every click instead of observing the stream of clicks. This leads to the fact that we unsubscribing and resubscribing all the time. Also makes this code hard to understand and explain any change. -- This message was sent by Atlassian JIRA (v7.6.3#76005)