Github user nickwallen commented on a diff in the pull request:
https://github.com/apache/metron/pull/1208#discussion_r224473335
--- Diff:
metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.ts
---
@@ -81,26 +81,28 @@ export class PcapPanelComponent implements OnInit,
OnDestroy {
this.pdml = null;
this.progressWidth = 0;
this.errorMsg = null;
- this.submitSubscription =
this.pcapService.submitRequest(pcapRequest).subscribe((submitResponse:
PcapStatusResponse) => {
- let id = submitResponse.jobId;
- if (!id) {
- this.errorMsg = submitResponse.description;
- this.queryRunning = false;
- } else {
- this.startPolling(id);
+ this.subscriptions['submitSubscription'] =
this.pcapService.submitRequest(pcapRequest).subscribe(
+ (submitResponse: PcapStatusResponse) => {
+ let id = submitResponse.jobId;
+ if (!id) {
+ this.errorMsg = submitResponse.description;
+ this.queryRunning = false;
+ } else {
+ this.startPolling(id);
+ }
+ }, (error: any) => {
+ this.errorMsg = `Response message: ${error.message}. Something
went wrong with your query submission!`;
--- End diff --
> The goal of this PR was to cancel the actual http requests when the user
navigates somewhere else. If users are not interested in the pcap panel
anymore, we don't need to wait for the server's answer. It's silly to wait for
the answer for a pcap request when you're on the alerts page.
What happens if I submit a pcap request, get bored and navigate back to
Alerts, then navigate back to Pcap to check on my job status? Will I be able
to 'see' my job finish and view the pcap?
---