diff --git a/public/index.html b/public/index.html index 8dbfc26a..12b226b6 100644 --- a/public/index.html +++ b/public/index.html @@ -22,9 +22,9 @@ - - - + + + @@ -81,30 +81,30 @@
- - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/packets.js b/public/packets.js index 072f56f9..f44f5700 100644 --- a/public/packets.js +++ b/public/packets.js @@ -324,6 +324,13 @@ // Check if new packets pass current filters const filtered = newPkts.filter(p => { + // Respect time window filter — drop packets outside the selected window + const windowMin = savedTimeWindowMin; + if (windowMin > 0) { + const cutoff = new Date(Date.now() - windowMin * 60000).toISOString(); + const pktTime = p.latest || p.timestamp || p.first_seen; + if (pktTime && pktTime < cutoff) return false; + } if (filters.type) { const types = filters.type.split(',').map(Number); if (!types.includes(p.payload_type)) return false; } if (filters.observer) { const obsSet = new Set(filters.observer.split(',')); if (!obsSet.has(p.observer_id)) return false; } if (filters.hash && p.hash !== filters.hash) return false;