Geräteliste: Workspace-Name mitliefern (GUI-Umbau)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLk93dhDMrkPXefVdknMV9
This commit is contained in:
1 parent
bfbd8f7b17
commit
f337718ec6
1 file changed
+11
-1
@@ -1950,9 +1950,12 @@ def fetch_devices_for_organization(organization_id: str):
|
||||
cur.execute(
|
||||
f"""
|
||||
SELECT d.id, d.hostname, d.device_fingerprint, d.agent_last_checkin,
|
||||
d.deprovisioned_at, d.oe_id, oe.name, {GERAETE_HEALTH_SPALTEN_SQL}
|
||||
d.deprovisioned_at, d.oe_id, oe.name, w.name, {GERAETE_HEALTH_SPALTEN_SQL}
|
||||
FROM devices d
|
||||
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.organization_id = %s AND d.archived_at IS NULL
|
||||
ORDER BY d.hostname NULLS LAST, d.created_at
|
||||
""",
|
||||
@@ -1971,10 +1974,17 @@ def fetch_devices_for_organization(organization_id: str):
|
||||
),
|
||||
"oe_id": str(oe_id) if oe_id is not None else None,
|
||||
"oe_name": oe_name,
|
||||
# Install-time zugewiesener Workspace (GUI-Umbau
|
||||
# 10.09.2026, Geräteliste-Spalte) - bei einer nachträglichen
|
||||
# Gerätegruppen-Workspace-Übersteuerung (ADR-0028) weicht
|
||||
# der tatsächlich wirksame Katalog davon ab, für den
|
||||
# genauen Stand siehe der Auftragskatalog-Seite des Geräts.
|
||||
"workspace_name": workspace_name,
|
||||
**_health_felder_aus_row(*health_spalten),
|
||||
}
|
||||
for (
|
||||
device_id, hostname, fingerprint, last_checkin, deprovisioned_at, oe_id, oe_name,
|
||||
workspace_name,
|
||||
*health_spalten,
|
||||
) in cur.fetchall()
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user