Commit Graph

6 Commits (master)

Author SHA1 Message Date
Joca 0e97029c59
Click-to-connect mode for rapid cabling
Added Connect Mode toggle button on rack and device views. When active,
clicking a port selects it (glowing accent border), clicking a second
port opens a mini form to choose connection type/color/labels and
create the cable in one flow. Escape or re-clicking deselects. Port
elements now use onclick JS instead of HTMX triggers to support both
normal inspection mode and connect mode.
2026-06-09 20:13:47 -03:00
Joca c56c512764
Show connection creation errors in modal
When a connection create fails (e.g. port already in use), the error
message now appears as a red alert in the modal instead of silently
re-rendering the 'no connection' state. Added Error field to
ConnectionModalData and created renderConnectionModalError helper.
2026-06-09 19:10:45 -03:00
Joca 459eef5d10
Group ports by device in connection modal dropdown
Replaced the flat 1000-entry select with optgroup grouping by device.
Each device gets its own optgroup label, making it possible to find
the target port even with hundreds of ports in the system.
2026-06-09 18:53:21 -03:00
Joca 3e20caa2d9
Fix ConnectionEdit silently NULLing out port references
The edit handler was fetching the connection twice but never using the
result, then constructing a new Connection struct without PortID1/PortID2
fields. The DB update would write NULL into both port columns, severing
the cable from both ends. Now the handler fetches the existing row once
and updates only the submitted metadata fields in place.
2026-06-09 18:49:46 -03:00
Joca 67ef5be483
Connection modal properly refreshes after create/edit/delete
- Connection handlers now re-render modal inline instead of redirecting
- Rack slots rendered top-to-bottom (U42 first, U1 last)
- Shared renderConnectionModal helper for DRY handler code
- Full connection tracing works through patch panels and wall sockets
2026-06-03 23:22:03 -03:00
Joca a0f05791f8
Initial commit: Go + HTMX network mapping tool
- Database schema (SQLite) with migrations
- Data models: racks, devices, device models, ports, connections
- CRUD store layer in internal/db/
- Connection tracing service
- HTTP handlers for overview, rack, device, model, connection, wall sockets
- HTML templates with HTMX for connection modal
- Dark-themed CSS
- Vanilla JS for modal overlay management
2026-06-03 23:11:15 -03:00