The 'Create Connection' form now shows directly when clicking an
unconnected port instead of being hidden inside a <details> element
requiring two clicks. Added a 'New Device' nav link that jumps to
the create form on the overview page.
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.
Each rack card now displays the number of devices inside (racked +
unplaced). Introduced a RackCard wrapper in the overview handler to
pair each rack with its precomputed count.
ModelDelete now checks the DB error (e.g. FK constraint from devices still
using the model) and renders the model list with an alert instead of
silently redirecting with no feedback.
The rack creation form now includes a Height (U) input defaulting to 42.
The handler reads it instead of hardcoding. Previously every rack was
silently locked at 42U until you went to the rack page to edit it.
Port spans now pick up the connection's actual color for border and a
light tint for background via inline styles. The .connected CSS class
only ups the border width to 2px for emphasis. Applied to _port_list.html
shared partial and wall_sockets.html inline rendering.
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.
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.
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.
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.
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.
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.
- 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