Commit Graph

12 Commits (cada7ab6c280921bb947f63b6c84276cdc27983f)

Author SHA1 Message Date
Joca cada7ab6c2
Add empty-state messages to overview page
Grid sections for Racks and Devices now show a dashed 'No X yet' message
when the collection is empty, using Go template {{else}} blocks. CSS
styles the placeholder with muted text and a dashed border.
2026-06-09 18:55:03 -03:00
Joca 842913659a
Model form: hide height when non-rack, disable side selector for patch panels
Added toggleRackHeight() to show/hide the height-in-units field when the
rack-mountable checkbox changes. Added togglePatchMode() to disable the
port side selector when is_patch_panel is checked, with an explanatory
note that all ports get doubled to front+back anyway. Also initializes
both states on page load so edit view reflects saved values.
2026-06-09 18:54:37 -03:00
Joca cfc4dc564a
Fix rack front/back column misalignment
Replaced independent flex columns with a single table where each rack
unit is a <tr> containing both front and back content. Row heights now
stay locked together regardless of device name length. Device-start
rows get a top border and surface background for visual grouping.
2026-06-09 18:54:04 -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 d9e7fb1ab1
Device and wall-socket views now highlight connected ports
Extracted shared _port_list.html partial with connected-port checking,
loaded into every page's template set. DeviceView and WallSocket handlers
now load connection data and pass it to the template. Removed duplicate
inline port_list definition from rack.html.
2026-06-09 18:52:32 -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 fcb04be887
Fix modal overlay sticking on page changes
- CSS now uses .open class instead of conflicting display:flex rule
- Simplified closeModal() - removed broken event.target checks
- Escape key calls closeModal() directly
- Removed stale style attribute from overlay div
2026-06-03 23:42:41 -03:00
Joca 5979df3cb5
Remove binaries from tracking 2026-06-03 23:22:19 -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 1a8799d711
Fixed template inheritance and SQLite connection pooling
- Each page template now parsed with base.html separately to avoid content block conflicts
- Connection fragments parsed standalone without base layout
- Increased SQLite max connections to 5 to prevent nested query deadlocks
- Verified connection tracing works through patch panels and wall sockets
2026-06-03 23:18:09 -03:00
Joca 037c4e5ce3
Add SQLite WAL files to .gitignore 2026-06-03 23:11:22 -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