wip netflow layout (#2668) #2833
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!2833
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2833/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub pull request.
Original GitHub pull request: #2670
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2670
Original created: 2026-02-02T05:09:02Z
Original updated: 2026-02-02T05:11:18Z
Original head: carverauto/serviceradar:staging
Original base: chore/agent-analysis
Original merged: 2026-02-02T05:09:17Z by @mfreeman451
User description
IMPORTANT: Please sign the Developer Certificate of Origin
Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include
a DCO sign-off statement indicating the DCO acceptance in one commit message. Here
is an example DCO Signed-off-by line in a commit message:
Describe your changes
Issue ticket number and link
Code checklist before requesting a review
PR Type
Enhancement
Description
Consolidate NetFlow, Events, and Alerts into unified Observability page
Add tabbed interface for NetFlow, Events, Alerts alongside Logs, Traces, Metrics
Implement summary cards and data tables for each new observability entity
Remove standalone NetFlow page and route to LogLive.Index instead
Add SRQL catalog entry for NetFlow flows with filtering support
Diagram Walkthrough
File Walkthrough
layouts.ex
Refactor layouts and consolidate sidebar navigationweb-ng/lib/serviceradar_web_ng_web/components/layouts.ex
embed_templatesandattr/slotdeclarations to function callsyntax with parentheses
active state logic
/netflows,/events,/alertsalongside existing paths
index.ex
Add Events, Alerts, and NetFlow tabs to Observability pageweb-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex
in mount
limit handling
event_summary,alert_summary, andnetflow_summarycomponentswith severity/status breakdowns
events_table,alerts_table, andnetflows_tablecomponents withfull data display
formatting, and badge rendering
netflow_presetscomponent with quick filter buttons for commonNetFlow queries
observability_tabsto include Events, Alerts, and NetFlow tabspanel_result_count,tab_entity,tab_limits, andapply_tab_assignsto handle new tabsindex.ex
Remove standalone NetFlow page moduleweb-ng/lib/serviceradar_web_ng_web/live/netflow_live/index.ex
Observability page
catalog.ex
Add NetFlow flows to SRQL catalogweb-ng/lib/serviceradar_web_ng_web/srql/catalog.ex
configuration
protocol, sampler address
/observabilitypagerouter.ex
Route NetFlow to unified Observability pageweb-ng/lib/serviceradar_web_ng_web/router.ex
/netflowsroute fromNetflowLive.IndextoLogLive.IndexImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2670#issuecomment-3832939119
Original created: 2026-02-02T05:09:45Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
No security concerns identified
No security vulnerabilities detected by AI analysis. Human verification advised for critical code.🎫 No ticket provided
Codebase context is not defined
Follow the guide to enable codebase context checks.
Generic: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.
Status: Passed
Generic: Meaningful Naming and Self-Documenting Code
Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting
Status: Passed
Generic: Secure Error Handling
Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.
Status: Passed
Generic: Secure Logging Practices
Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.
Status: Passed
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities
Status: Passed
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status:
Nil arithmetic risk:
compute_netflow_summary/1addsbytesinto:total_bytesand may crash ifto_int/1canreturn
nilfor missing/invalid flow byte values.Referred Code
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2670#issuecomment-3832942506
Original created: 2026-02-02T05:11:18Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Refactor the monolithic LiveView into components
The
LogLive.Indexmodule has become a large, monolithic LiveView by adding logicfor Events, Alerts, and NetFlows. This should be refactored by moving the logic
and rendering for each tab into its own dedicated LiveComponent.
Examples:
web-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex [1-3219]
Solution Walkthrough:
Before:
[To ensure code accuracy, apply this suggestion manually]Suggestion importance[1-10]: 9
__
Why: This suggestion correctly identifies a critical bug that would cause a runtime error on the initial render of the LiveView. Initializing
@limitinmount/3is the correct fix to prevent this error.Simplify nested case statement logic
Simplify the nested
casestatement in thenetflow_protocol_badge/1function toimprove readability and remove redundant logic. The current implementation
contains a fallback that is unlikely to be executed as intended.
web-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex [1641-1675]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies a convoluted and potentially buggy nested
casestatement. The proposed simplification improves code readability and removes redundant logic, making the function's behavior clearer and more robust.Refactor source lookup using Enum
Refactor the
event_source/1function to useEnum.find_value/3instead of a chainof
||operators. This will make the source lookup logic more concise, readable,and easier to maintain.
web-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex [1398-1412]
Suggestion importance[1-10]: 5
__
Why: The suggestion proposes a valid refactoring that improves code readability and maintainability by replacing a chain of
||operators withEnum.find_value/3. This is a good practice, especially as the list of keys to check might grow.Refactor message lookup using Enum
Refactor the
event_message/1function to useEnum.find_value/3instead of achain of
||operators. This will make the message lookup logic more concise,readable, and easier to maintain.
web-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex [1414-1427]
Suggestion importance[1-10]: 5
__
Why: The suggestion proposes a valid refactoring that improves code readability and maintainability by replacing a chain of
||operators withEnum.find_value/3. This is a good practice, especially as the list of keys to check might grow.