feat(devices): add console-only display name (console_name)
Lets staff set a friendly name for a device independent of whatever name the end user gave it in the app. console_name is never shown to app users and never synced from/to device_name; every display label across search, equipment/helpdesk name resolution, device search, and the Manage tab's issue linker now falls back through console_name -> device_name -> serial rather than device_name alone. Also includes an incidental one-line fix in devices/service.py: the nested-struct deep-merge in update_device() was missing the newly added device_health_settings key. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,8 +26,9 @@ def _search_devices(q: str) -> list[dict]:
|
||||
return []
|
||||
out = []
|
||||
for d in results[:LIMIT]:
|
||||
label = d.device_name or d.serial_number or d.device_id or d.id
|
||||
sublabel = d.serial_number if d.device_name else None
|
||||
display_name = d.console_name or d.device_name
|
||||
label = display_name or d.serial_number or d.device_id or d.id
|
||||
sublabel = d.serial_number if display_name else None
|
||||
out.append({
|
||||
"type": "device",
|
||||
"id": d.id,
|
||||
|
||||
Reference in New Issue
Block a user