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

    https://github.com/apache/metron/pull/1159#discussion_r209683673
  
    --- Diff: 
metron-interface/metron-alerts/src/app/pcap/pcap-filters/pcap-filters.component.ts
 ---
    @@ -63,9 +63,13 @@ export class PcapFiltersComponent implements OnInit, 
OnChanges {
         this.model.endTimeMs = new Date(this.endTimeStr).getTime();
         if (this.ipSrcPort !== '') {
           this.model.ipSrcPort = +this.ipSrcPort;
    +    } else {
    --- End diff --
    
    This is probably a dumb question, but why do we have to specifically delete 
the value?  Don't we treat empty string the same as missing?  If that's the 
case, why isn't this just 
    ```
    this.model.ipSrcPort = +this.ipSrcPort;
    this.model.ipDstPort = +this.ipDstPort;
    ```
    
    Sidenote, are the pluses in here even doing anything? Could it just be
    ```
    this.model.ipSrcPort = this.ipSrcPort;
    this.model.ipDstPort = this.ipDstPort;
    ```
    



---

Reply via email to