wip netflow layout #2832
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!2832
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2832/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: #2668
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2668
Original created: 2026-02-02T04:59:22Z
Original updated: 2026-02-02T05:08:08Z
Original head: carverauto/serviceradar:2655-chore-sidebar-nav-cleanup---observability
Original base: staging
Original merged: 2026-02-02T05:08:06Z 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 Observability unified view
Remove standalone NetFlow page and integrate as observability tab
Add Events and Alerts tabs to observability dashboard
Implement summary panels and tables for events, alerts, and netflows
Update sidebar navigation to group observability features
Diagram Walkthrough
File Walkthrough
layouts.ex
Refactor sidebar navigation for observability consolidationweb-ng/lib/serviceradar_web_ng_web/components/layouts.ex
embed_templatesandattrcalls to use parentheses syntaxitem
index.ex
Add Events, Alerts, and NetFlow tabs to Observabilityweb-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex
components
filtering
limits
index.ex
Remove standalone NetFlow pageweb-ng/lib/serviceradar_web_ng_web/live/netflow_live/index.ex
catalog.ex
Add NetFlow entity to SRQL catalogweb-ng/lib/serviceradar_web_ng_web/srql/catalog.ex
flowsentity to SRQL catalog for NetFlow queriesand filter fields
router.ex
Route NetFlow to observability dashboardweb-ng/lib/serviceradar_web_ng_web/router.ex
/netflowsroute toLogLive.Indexinstead ofNetflowLive.IndexImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2668#issuecomment-3832918620
Original created: 2026-02-02T05:00:05Z
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.🎫 #2655
Netflowoff the main sidebar navigation and into theObservabilitypage as a new tab.Alertsoff the main sidebar navigation and into theObservabilitypage as a new tab.Eventsoff the main sidebar navigation and into theObservabilitypage as a new tab.Netflow,Alerts, andEventsitems, and that they appear and behave correctly as tabs underObservability(including active-state highlighting and navigation behavior).
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:
Invalid row navigation: The new events/alerts table rows can navigate to
/events/unknownor/alerts/unknownwhenan item lacks an id, instead of gracefully disabling navigation or handling the missing
identifier.
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/2668#issuecomment-3832919166
Original created: 2026-02-02T05:00:19Z
CI Feedback 🧐
A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
Action: build
Failed stage: Configure SRQL fixture database for tests [❌]
Failed test name: ""
Failure summary:
The action failed during environment/secret validation because the
SRQL_TEST_DATABASE_CA_CERTvaluewas empty/unset.
The workflow requires
SRQL_TEST_DATABASE_CA_CERTto be configured in order toverify TLS for the SRQL test fixture, and it exited with code 1 after printing:
SRQL_TEST_DATABASE_CA_CERT secret must be configured to verify SRQL fixture TLS.Relevant error logs:
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2668#issuecomment-3832922323
Original created: 2026-02-02T05:01:46Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Consolidate observability tabs into separate components
Refactor the
LogLive.IndexLiveView by extracting the logic for eachobservability tab (Events, Alerts, NetFlows) into its own dedicated
LiveComponent to improve modularity and maintainability.
Examples:
web-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex [1-2831]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 9
__
Why: This is a critical architectural suggestion that addresses the significant complexity introduced in
LogLive.Index, which has become a "god module" and will be hard to maintain.Prevent nil values from causing errors
In
compute_netflow_summary, provide a default value of0when callingto_intonthe results of
netflow_protocol_numandnetflow_bytesto prevent crashes fromnilvalues.web-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex [2605-2634]
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies that
netflow_protocol_num/1andnetflow_bytes/1can returnnil, which would cause a crash when passed toto_int/1. Providing a default value makes the summary computation more robust and prevents potential runtime errors, which is a significant improvement.Apply max_limit in SRQL init
Pass
max_limittoensure_srql_entityand then toSRQLPage.initto ensureconsistent limit handling when initializing the SRQL page state for a new
entity.
web-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex [68-2831]
[To ensure code accuracy, apply this suggestion manually]Suggestion importance[1-10]: 7
__
Why: The suggestion correctly identifies that
max_limitis not being passed toSRQLPage.init, leading to inconsistent limit handling for new entities. Applying this change ensures that bothdefault_limitandmax_limitare correctly initialized, improving the correctness of the pagination logic.Simplify complex nested case statements
Refactor the
netflow_protocol_badgefunction to use acondstatement instead ofnested
casestatements for better readability, and handle potentialnilvaluesfrom
to_intby providing a default.web-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex [1641-1675]
Suggestion importance[1-10]: 5
__
Why: The suggestion correctly points out that nested
casestatements can be simplified usingcond, which improves code readability. It also correctly identifies a potentialnilvalue issue withto_int(protocol), and the proposed fix makes the function more robust.Simplify sidebar active check
Refactor the
activecheck for the "Observability" sidebar link to useEnum.any?with a list of paths, simplifying the logic and improving maintainability.
web-ng/lib/serviceradar_web_ng_web/components/layouts.ex [165-177]
Suggestion importance[1-10]: 5
__
Why: The suggestion improves code readability and maintainability by replacing multiple
||conditions with a more scalableEnum.any?check. This makes the code cleaner and easier to modify in the future.Simplify nested data access logic
Refactor the
netflow_flow_typefunction to use a more idiomatic pipeline withget_inandcasefor cleaner and more concise nested data access.web-ng/lib/serviceradar_web_ng_web/live/log_live/index.ex [1714-1732]
Suggestion importance[1-10]: 4
__
Why: The suggestion offers a more idiomatic and slightly cleaner way to access nested data using
get_inandcase. While the original code is correct, the proposed change improves readability and conciseness.