new traffic filters#704
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe traffic events page and table are refactored to use ServerPaginationProvider for centralized pagination/filtering, replacing local state and prop-driven data fetching. A new PeerResourcePicker filter component is added for source/destination filtering, and ServerPaginationProvider gains an optional ChangesTraffic Events Server-Driven Refactor
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant NetworkTrafficPage
participant ServerPaginationProvider
participant API
participant TrafficEventsTable
participant PeerResourcePicker
NetworkTrafficPage->>ServerPaginationProvider: mount with url, defaultFilters, enabled
ServerPaginationProvider->>API: fetch /events/network-traffic (if enabled)
API-->>ServerPaginationProvider: paginated traffic events
TrafficEventsTable->>ServerPaginationProvider: useServerPagination(data, filters)
ServerPaginationProvider-->>TrafficEventsTable: rows, active filters
TrafficEventsTable->>PeerResourcePicker: render Source/Destination filter chip
PeerResourcePicker-->>TrafficEventsTable: onChange(source_id/destination_id)
TrafficEventsTable->>ServerPaginationProvider: update filter state
ServerPaginationProvider->>API: refetch with new filters
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/app/(dashboard)/events/traffic/page.tsxOops! Something went wrong! :( ESLint: 9.39.3 TypeError: Converting circular structure to JSON src/cloud/traffic-events/TrafficEventsPeerTabContent.tsxOops! Something went wrong! :( ESLint: 9.39.3 TypeError: Converting circular structure to JSON src/cloud/traffic-events/TrafficEventsTable.tsxOops! Something went wrong! :( ESLint: 9.39.3 TypeError: Converting circular structure to JSON
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Upstream features preserved: - Agent Network (netbirdio#684, netbirdio#708) - Lazy Connections (netbirdio#706) - New Traffic Filters (netbirdio#704) - Cluster one-click deploy (netbirdio#707) - etc. i18n preserved: - All zh.ts/en.ts keys intact - Control-center, VersionInfo, Navigation translations - Translation framework (next-intl) retained Resolved: Navigation t() definition, PeersTable types
Issue ticket number and link
Documentation
Select exactly one:
Docs PR URL (required if "docs added" is checked)
Paste the PR link from https://github.com/netbirdio/docs here:
https://github.com/netbirdio/docs/pull/__
E2E tests
Optional: override the image tags used by the Playwright e2e workflow.
Defaults to
mainwhen omitted.management-cloud-tag: main
reverse-proxy-tag: main
Summary by CodeRabbit
New Features
Bug Fixes