Admin-Geräteliste: Workspace-Name mitliefern (GUI-Umbau Phase 2)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLk93dhDMrkPXefVdknMV9
This commit is contained in:
adminandClaude Sonnet 5 committed 2026-09-11 08:59:02 +02:00
1 parent ed217032d8
commit aa9072ef91
1 file changed
+6 -2
+6 -2
View File
@@ -2010,11 +2010,14 @@ def fetch_all_devices():
cur.execute(
f"""
SELECT d.id, d.hostname, d.device_fingerprint, d.agent_last_checkin,
d.organization_id, o.name, d.deprovisioned_at, d.oe_id, oe.name,
d.organization_id, o.name, d.deprovisioned_at, d.oe_id, oe.name, w.name,
{GERAETE_HEALTH_SPALTEN_SQL}
FROM devices d
JOIN organizations o ON o.id = d.organization_id
LEFT JOIN organisationseinheiten oe ON oe.id = d.oe_id
LEFT JOIN assignments a ON a.device_id = d.id
LEFT JOIN bereitstellungsvorlagen bv ON bv.id = a.bereitstellungsvorlage_id
LEFT JOIN workspaces w ON w.id = bv.workspace_id
WHERE d.archived_at IS NULL
ORDER BY o.name, d.hostname NULLS LAST, d.created_at
"""
@@ -2034,12 +2037,13 @@ def fetch_all_devices():
),
"oe_id": str(oe_id) if oe_id is not None else None,
"oe_name": oe_name,
"workspace_name": workspace_name,
**_health_felder_aus_row(*health_spalten),
}
for (
device_id, hostname, fingerprint, last_checkin,
organization_id, organization_name, deprovisioned_at,
oe_id, oe_name,
oe_id, oe_name, workspace_name,
*health_spalten,
) in cur.fetchall()
]