Github user merrimanr commented on a diff in the pull request:
https://github.com/apache/metron/pull/1118#discussion_r207239050
--- Diff:
metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.ts
---
@@ -22,33 +22,35 @@ import { PcapRequest } from '../model/pcap.request'
import { Pdml } from '../model/pdml'
import {Subscription} from "rxjs/Rx";
+class Query {
+ id: String
+}
+
@Component({
selector: 'app-pcap-panel',
templateUrl: './pcap-panel.component.html',
styleUrls: ['./pcap-panel.component.scss']
})
-export class PcapPanelComponent implements OnInit {
+export class PcapPanelComponent {
@Input() pdml: Pdml = null;
-
@Input() pcapRequest: PcapRequest;
statusSubscription: Subscription;
queryRunning: boolean = false;
+ queryId: string;
progressWidth: number = 0;
selectedPage: number = 1;
errorMsg: string;
- constructor(private pcapService: PcapService ) { }
-
- ngOnInit() {
- }
+ constructor(private pcapService: PcapService ) {}
onSearch(pcapRequest) {
console.log(pcapRequest);
this.pdml = null;
this.progressWidth = 0;
this.pcapService.submitRequest(pcapRequest).subscribe(id => {
+ this.queryId = id;
--- End diff --
The submitRequest function should return an observable of type
PcapStatusResponse.
---