[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user merrimanr commented on the issue: https://github.com/apache/metron/pull/1172 I verified that bug is fixed now. Nice job +1. ---
[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1172 @merrimanr Tha bug you find was very interesting. We tried two different approaches to fix, but I think @ruffle1986 solution is more suitable and elegant here. I merged it. Please take a look and give a +1 if it's good to go. ---
[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user ruffle1986 commented on the issue: https://github.com/apache/metron/pull/1172 It's not just simply about sharing the same validator function. It's more complicated than that. Here's a possible fix for that: https://github.com/tiborm/metron/pull/11 ---
[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user ruffle1986 commented on the issue: https://github.com/apache/metron/pull/1172 I think the problem is that we use the same validator function for both the start and the end date. So after putting it into an invalid state (step 2), however you add a valid time to the start date, the validator function will complain because the end time is still in an invalid state. That's why the start time is still marked in red. ---
[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user merrimanr commented on the issue: https://github.com/apache/metron/pull/1172 I found one small bug. Here's how to reproduce: 1. Set the FROM date to be greater than the TO date. A validation message should appear as expected. 2. Set the TO date to be in the future. Validation message still displays as expected and both inputs are marked with red. 3. Change the FROM date to be less than the TO date and not in the future. The FROM date is still marked in red when it should not be. 4. Change the TO date to not be in the future but greater than the FROM date. The TO data is no longer marked in red but the validation message is still displayed. At this point there should be no validation messages. ---
[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1172 As a result of the followup discussion about the placing of the transform functions, I moved them back to the filter component. ---
[GitHub] metron issue #1172: METRON-1724: Date/time validation missing in PCAP query
Github user tiborm commented on the issue: https://github.com/apache/metron/pull/1172 @sardell @ruffle1986 I made the following changes based on your feedback: - default values for the timestamps removed - DEFAULT_START_TIME and DEFAULT_END_TIME moved to constants.ts (theoretically these values are reusable) - transform functions moved to utils.ts to make the filter component cleaner I think this is cleaner and more aligned with the other parts of the code. ---