Each model row now has a Clone button that duplicates the model with all
its ports, flags, and images, appending '(copy)' to the name. Saves
re-creating 48 ports when making a sibling switch model.
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.
UNIQUE constraint violations from rack/device/model creation and editing
now show readable messages like 'A rack named X already exists, onii-chan'
instead of raw SQLite error strings or silent redirects.
Added is_power_strip flag to device_models (schema migration, model,
form checkbox, DB CRUD). Power strip devices in rack view now render
a grid of plug-icon outlets instead of the regular port list, with
custom cable colors showing which outlets are in use.
Device view now has a 'Rename Ports' section with inline inputs for
every port. Port names are no longer immutable after device creation.
Added PortUpdateName to DB layer and POST /devices/{id}/ports/rename.
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.
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