[
https://issues.apache.org/jira/browse/METRON-1683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553404#comment-16553404
]
ASF GitHub Bot commented on METRON-1683:
----------------------------------------
Github user merrimanr commented on a diff in the pull request:
https://github.com/apache/metron/pull/1122#discussion_r204553631
--- Diff:
metron-interface/metron-alerts/src/app/pcap/pcap-panel/pcap-panel.component.ts
---
@@ -0,0 +1,71 @@
+import { Component, OnInit, Input } from '@angular/core';
+
+import { PcapService, PcapStatusResponse } from '../service/pcap.service';
+import { PcapRequest } from '../model/pcap.request';
+import { Pdml } from '../model/pdml';
+import {Subscription} from 'rxjs/Rx';
+import { PcapPagination } from '../model/pcap-pagination';
+
+class Query {
+ id: String
+}
+
+@Component({
+ selector: 'app-pcap-panel',
+ templateUrl: './pcap-panel.component.html',
+ styleUrls: ['./pcap-panel.component.scss']
+})
+export class PcapPanelComponent {
+
+ @Input() pdml: Pdml = null;
+ @Input() pcapRequest: PcapRequest;
+ @Input() resetPaginationForSearch: boolean;
+
+ statusSubscription: Subscription;
+ queryRunning: boolean = false;
+ queryId: string;
+ progressWidth: number = 0;
+ pagination: PcapPagination = new PcapPagination();
+ savedPcapRequest: {};
+ selectedPage: number = 1;
+
+ constructor(private pcapService: PcapService ) { }
+
+ changePage(page) {
+ this.selectedPage = page;
+ this.pcapService.getPackets(this.queryId,
this.selectedPage).toPromise().then(pdml => {
+ this.pdml = pdml;
+ });
+ }
+
+ onSearch(pcapRequest, resetPaginationForSearch = true, from = 1) {
+ this.savedPcapRequest = pcapRequest;
+ if (resetPaginationForSearch === true) {
+ pcapRequest.from = 1;
--- End diff --
Shouldn't this set the selectedPage to 1? The `from` property on
PcapRequest doesn't do anything. I am seeing this bug:
- execute a search
- navigate to page 2 in the results
- execute another search
- the search results are retrieved for the page I was previously on instead
of the first page
> PCAP UI - Fix the download progress bar
> ---------------------------------------
>
> Key: METRON-1683
> URL: https://issues.apache.org/jira/browse/METRON-1683
> Project: Metron
> Issue Type: Sub-task
> Reporter: Shane Ardell
> Priority: Major
>
> The download progress bar currently does not appear when a PCAP search is
> submitted.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)