Skip to content

feat: network topology visualisation (#95) - #104

Merged
reloadfast merged 2 commits into
mainfrom
feat/network-topology-95
Mar 2, 2026
Merged

reloadfast merged 2 commits into
mainfrom
feat/network-topology-95

Conversation

@reloadfast

Copy link
Copy Markdown
Owner

Closes #95

Summary

Adds an interactive network graph at /topology showing all devices and their relationships.

Backend

  • GET /api/topology — returns all devices enriched with highest_severity, port_count, security_score, is_gateway
  • Gateway detection: device_type=router first, then first device with IP ending in .1

Frontend

  • TopologyPage built with @xyflow/react (React Flow)
  • Gateway at centre, devices arranged in a radial ring clustered by type (server/workstation/IoT/unknown)
  • Node border colour matches risk severity: red=critical, orange=high, yellow=medium, green=clean
  • Critical/high nodes pulse with CSS animation
  • Click any node → /devices/:id
  • Zoom, pan, fit-view controls built-in
  • Topology nav link added between Devices and Risks

Tests

  • 4 backend tests (51 total): empty list, required fields, gateway by IP, gateway by device_type
  • 2 frontend tests (144 total): empty state, canvas renders with devices
  • ResizeObserver polyfill added to test setup for React Flow compatibility

reloadfast and others added 2 commits March 2, 2026 12:49
- Add GET /api/topology endpoint returning devices enriched with
  highest_severity, port_count, security_score, is_gateway
- Gateway detection: device_type=router takes priority, then IP ending in .1
- Add TopologyPage using @xyflow/react with radial layout
- Gateway node at centre, devices clustered by type in ring
- Node border colour by highest active risk severity (red/orange/yellow/green)
- Pulsing animation for critical/high risk nodes
- Click node navigates to /devices/:id
- Add /topology route and 'Topology' nav link between Devices and Risks
- Add ResizeObserver polyfill to test setup for React Flow compatibility
- 4 new backend tests (51 total), 2 new frontend tests (144 total)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@reloadfast
reloadfast merged commit 4c81210 into main Mar 2, 2026
7 checks passed
@reloadfast
reloadfast deleted the feat/network-topology-95 branch March 2, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Network Topology Visualisation (interactive device graph)

1 participant