Move the port inspector onto device pages #5

Merged
jared merged 1 commits from per-device-inspector into main 2026-11-05 10:16:17 -05:00
Owner

What changed

  • Inspector moved to device pages. Each switch or router page now has its own front panel, port table and port detail panel. The all-switches Inspector page and its nav links are gone, and /inspector redirects to the dashboard.
  • Direct port links. /device/<name>#port-<n> opens a specific port. Uplinks on device pages link this way.
  • Neighbor names restored. UniFi's LLDP table now uses local_port_idx and no longer sends system_name. Gandalf reads the new field and matches MACs against Prometheus NIC data, UniFi devices and the wired client table.
  • Run Diagnostics should return on server ports, because it depends on a named neighbor.
  • Front panel polish. Port blocks are larger, labels no longer overlap, and hovering shows the full neighbor name.

Testing

  • 210 tests pass; flake8 is clean; ESLint reports 0 errors.
  • Checked in a browser against live data: 25 neighbors resolved, port links work, and there is no sideways scroll on mobile or tablet.
  • Diagnostic results survive a page refresh (tested with mocked results), and the real /api/diagnose accepted a port.

Not tested: a full diagnostics run through Pulse. The test setup had no Pulse connection, so this needs one run on a server port after deploy.

Known limits

  • Bond members share a MAC, so only one port of a bond is identified.
  • README screenshots still need retaking, and line 14's alt text still mentions link debug.

🤖 Generated with Claude Code

## What changed - **Inspector moved to device pages.** Each switch or router page now has its own front panel, port table and port detail panel. The all-switches Inspector page and its nav links are gone, and `/inspector` redirects to the dashboard. - **Direct port links.** `/device/<name>#port-<n>` opens a specific port. Uplinks on device pages link this way. - **Neighbor names restored.** UniFi's LLDP table now uses `local_port_idx` and no longer sends `system_name`. Gandalf reads the new field and matches MACs against Prometheus NIC data, UniFi devices and the wired client table. - **Run Diagnostics should return on server ports**, because it depends on a named neighbor. - **Front panel polish.** Port blocks are larger, labels no longer overlap, and hovering shows the full neighbor name. ## Testing - 210 tests pass; flake8 is clean; ESLint reports 0 errors. - Checked in a browser against live data: 25 neighbors resolved, port links work, and there is no sideways scroll on mobile or tablet. - Diagnostic results survive a page refresh (tested with mocked results), and the real `/api/diagnose` accepted a port. **Not tested:** a full diagnostics run through Pulse. The test setup had no Pulse connection, so this needs one run on a server port after deploy. ## Known limits - Bond members share a MAC, so only one port of a bond is identified. - README screenshots still need retaking, and line 14's alt text still mentions link debug. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jared added 1 commit 2026-11-05 10:11:22 -05:00
Move the port inspector onto device pages
Lint / JS (eslint) (push) Successful in 1m14s
Lint / Python (flake8) (push) Successful in 2m12s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Security / Python Security (bandit) (push) Successful in 1m3s
Test / Python Tests (pytest) (push) Successful in 1m11s
Lint / Python (flake8) (pull_request) Successful in 1m1s
Lint / JS (eslint) (pull_request) Successful in 10s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (pull_request) Successful in 56s
Test / Python Tests (pytest) (pull_request) Successful in 1m5s
bdcfb76c25
Replace the all-switches Inspector page with a per-device front panel,
port table and detail panel. /inspector now redirects to the dashboard,
and /device/<name>#port-<n> links directly to a port.

Restore neighbor names after UniFi's LLDP change: read local_port_idx
and resolve neighbors by MAC using Prometheus NIC data, UniFi devices
and the wired client table. This also brings back Run Diagnostics on
server ports, which depends on a named neighbor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared merged commit d6263049ef into main 2026-11-05 10:16:17 -05:00
jared deleted branch per-device-inspector 2026-11-05 10:16:17 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/gandalf#5