From 7bde765f1a981da6a0f2bc82a7a0e39d5167a711 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Sun, 12 Jul 2026 06:39:11 -0400 Subject: [PATCH] Render vendor-model photos on asset detail heroes Computer and Printer payloads now surface the linked model imageurl the way machines already did, and the machine/PC/printer detail heroes render the photo when present (network devices and measuring tools have no model link, so nothing to surface). Absent images render nothing rather than a broken icon. Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 7 ++ frontend/src/views/machines/MachineDetail.vue | 3 + .../measuringtools/MeasuringToolDetail.vue | 3 + .../src/views/network/NetworkDeviceDetail.vue | 3 +- frontend/src/views/pcs/PCDetail.vue | 3 + frontend/src/views/printers/PrinterDetail.vue | 3 + plugins/computers/models/computer.py | 2 + plugins/printers/models/printer.py | 2 + .../test_model_image_in_detail.py | 100 ++++++++++++++++++ 9 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 tests/test_plugins/test_model_image_in_detail.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 86a842c..0875d13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ ADR-007 and ADR-002. ### Added +- Vendor-model photos on asset detail heroes: computers and printers now + surface the linked model's `imageurl` in their extension payloads (the + field machines already exposed), and the machine, PC, printer, network + device, and measuring tool detail pages render the photo in the hero card + when present (hidden cleanly when absent). Network devices and measuring + tools have no model link yet, so their heroes stay photo-less until one + is added. - Dualpath "single machine" site toggle (`dualpath_single_machine`, default on). A Dualpath relationship pair is one physical dual-bay machine (single controller, bay-selector switch); when on, the machines list, dashboard and diff --git a/frontend/src/views/machines/MachineDetail.vue b/frontend/src/views/machines/MachineDetail.vue index 0c680f4..0d04090 100644 --- a/frontend/src/views/machines/MachineDetail.vue +++ b/frontend/src/views/machines/MachineDetail.vue @@ -28,6 +28,9 @@
+
+ +

{{ machine.assetnumber }}

diff --git a/frontend/src/views/measuringtools/MeasuringToolDetail.vue b/frontend/src/views/measuringtools/MeasuringToolDetail.vue index d63903f..43d49c0 100644 --- a/frontend/src/views/measuringtools/MeasuringToolDetail.vue +++ b/frontend/src/views/measuringtools/MeasuringToolDetail.vue @@ -15,6 +15,9 @@