feat: COM-port support for workstation devices + agent UI fixes

- EquipmentPage: add COM-port connection type with port field (COM1, /dev/ttyUSB0)
- api.ts: add comPort field to WorkstationDevice type
- workstations route: pass com_port to INSERT/PATCH
- migration 042: extend connection check constraint to include 'com', add com_port column
- agent index.html: highlight first cell on load, reset input on unpair

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 12:41:31 +03:00
parent c5413566dd
commit b2b2034f4c
4 changed files with 51 additions and 19 deletions

View File

@@ -0,0 +1,13 @@
-- Добавляем поддержку COM-порта для устройств рабочего места
-- Расширяем CHECK constraint для connection (добавляем 'com')
ALTER TABLE workstation_devices
DROP CONSTRAINT IF EXISTS workstation_devices_connection_check;
ALTER TABLE workstation_devices
ADD CONSTRAINT workstation_devices_connection_check
CHECK (connection IN ('usb', 'network', 'com'));
-- Добавляем поле com_port (например: COM1, COM3, /dev/ttyUSB0)
ALTER TABLE workstation_devices
ADD COLUMN IF NOT EXISTS com_port VARCHAR(50);