From 846953194c389602069778a9695d89f164181a8c Mon Sep 17 00:00:00 2001 From: Bobban Rydh Date: Thu, 17 Sep 2026 20:05:19 +0200 Subject: [PATCH] Show a hint when Proxmox storage list comes back empty, not silently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Confirmed via the user's rebuild: my previous fix caught a *thrown* storage-fetch error, but Proxmox's /nodes/{node}/storage instead returns 200 with an empty array when the API token has no Datastore.Audit on any storage — it filters the list per-token rather than erroring the whole call. That shape has error === null and storages.length === 0, so it fell through both my error banner and the "no storages" render guard, showing nothing. The Storage section now renders a hint (naming the missing Datastore.Audit privilege) whenever storages is empty and no error was recorded, instead of just disappearing. CPU/RAM/uptime are unaffected by this since they come from the separate /status call. Verified against a mock Proxmox API returning this exact 200-with- empty-array shape for /storage. Co-Authored-By: Claude Sonnet 5 --- web/src/pages/Proxmox.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/pages/Proxmox.tsx b/web/src/pages/Proxmox.tsx index 072fd54..c57ea53 100644 --- a/web/src/pages/Proxmox.tsx +++ b/web/src/pages/Proxmox.tsx @@ -218,7 +218,7 @@ export default function Proxmox({ user }: { user: CurrentUser }) { )} - {n.storages.length > 0 && ( + {n.storages.length > 0 ? (
Storage
@@ -239,6 +239,14 @@ export default function Proxmox({ user }: { user: CurrentUser }) {
+ ) : ( + !n.error && ( +
+ No storage visible to this API token. Proxmox filters the storage list per-token — + grant it Datastore.Audit (e.g. on /storage) to see disk + usage here. +
+ ) )}