From 94d8d6c9b67fefe797af52d46e5ef225351aa455 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Tue, 11 Aug 2026 16:27:14 -0400 Subject: [PATCH] dashboard: numbers that agree, a map on hover, wider cards "All assets 704" sat beside "all assets in use 737", and both were correct about different populations. The totals summed five specific asset types and subtracted dual-bay secondaries; the status counts took every asset row of any type with no collapse, so USB devices and hidden secondary bays inflated one side of a comparison the layout invites. Status is now counted over exactly the same assets the totals describe. Warranty rows fell back to asset.name when the covered asset had no hostname, and an asset's name is usually the MACHINE's descriptive name - which is how a column meant to identify a PC ended up showing a machine. Hostname, else the asset number, never the name. The machine number loses its label too: the row is hostname, machine, state, and "machine 3015" spends a word on what position already conveys. Printer names now carry the floor-plan preview on hover, the same LocationMapTooltip the printer's own page uses - a location name tells you the room, the map tells you where to walk. Declared as map.maphover on the card, so any card with coordinates gets it; a row without them shows a plain link rather than being dropped. Cards are four across rather than five. At five columns a row holding a hostname, a machine number and a state truncates on exactly the rows that matter. auto-fit, so two cards fill the width instead of leaving empty tracks. Not covered by a test: the count fix. I started one and it was interrupted, and I have not gone back for it - the assertion worth having is that in-use can never exceed the total. --- frontend/src/components/DashboardCards.vue | 20 +++++++++-- frontend/src/components/dashboardCards.js | 13 +++++++ plugins/printers/api/asset_routes.py | 7 ++++ plugins/printers/plugin.py | 6 ++++ plugins/warranty/api/routes.py | 6 +++- plugins/warranty/plugin.py | 5 ++- shopdb/core/api/dashboard.py | 41 +++++++++++++++++----- 7 files changed, 85 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/DashboardCards.vue b/frontend/src/components/DashboardCards.vue index 4ac99d4..93e13a7 100644 --- a/frontend/src/components/DashboardCards.vue +++ b/frontend/src/components/DashboardCards.vue @@ -19,7 +19,17 @@