ui: redesign Tuerschilder page as card grid with all device info
- Card per device showing: hostname, MAC, version, LEDs, segments - Segment assignments displayed per card - Last activity timestamp - Online/offline dot in card header - Action buttons in card footer - Add device + firmware upload side by side at bottom Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -335,6 +335,14 @@ async def devices_page(request: Request):
|
||||
""", (dev["hostname"],)).fetchone()
|
||||
d = dict(dev)
|
||||
d["last_activity"] = last_act["la"] if last_act and last_act["la"] else None
|
||||
# Segment assignments for this device
|
||||
d["segments"] = conn.execute("""
|
||||
SELECT a.segment, u.display_name
|
||||
FROM assignments a
|
||||
JOIN users u ON u.azure_id = a.user_azure_id
|
||||
WHERE a.wled_device_id = ?
|
||||
ORDER BY a.segment
|
||||
""", (dev["id"],)).fetchall()
|
||||
devices.append(d)
|
||||
last_check_row = conn.execute(
|
||||
"SELECT MAX(last_check) as lc FROM wled_devices WHERE last_check IS NOT NULL"
|
||||
|
||||
Reference in New Issue
Block a user