Show per-disk usage for Proxmox-linked servers too, not just a total
The agent path showed a per-mount usage table; a Proxmox-linked server
only ever got a single "Disk (allocated)" figure, since that's all the
VM/LXC config alone can tell you -- it's the attached disk's declared
size, not how full it actually is inside the guest. Fix the actual gap
instead of just matching the display: fetch real usage where Proxmox
can see it.
adapter.getGuestDetail() gained a `disks` field (same {mount,
sizeBytes, usedBytes} shape the agent already reports, so the frontend
renders both identically):
- LXC: the host can read straight into the container's root
filesystem, no agent needed -- status/current's disk/maxdisk fields
are real usage, not just allocation.
- QEMU: the hypervisor can't see inside a virtual disk at all without
help, so this calls the QEMU guest agent's get-fsinfo command (same
"gracefully degrade if the agent's missing/older" tolerance already
used for its IP-address lookup, and independent of it -- one
command failing doesn't take out the other). Pseudo-filesystems
(tmpfs, etc.) are filtered out by checking for a non-empty backing
`disk` array, the common convention for this endpoint.
Extracted the disks-table JSX (previously only in the agent branch)
into a shared DisksTable component and used it in both branches, and
added a note explaining an empty result when a running QEMU VM's
guest agent doesn't support get-fsinfo (an older agent version).
Verified against a mock Proxmox API over real TLS: an LXC's root
usage, a QEMU VM's real fsinfo mounts (with the disk-less tmpfs entry
correctly filtered), and a QEMU VM whose get-fsinfo fails outright --
confirming that degrades to an empty disks list without throwing and
without affecting the separate network-get-interfaces result.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
08a984719f
commit
81e55fc792
4 files changed
+77
-21
No files matched your search
@@ -49,8 +49,11 @@ All modules from the original plan are built:
|
||||
clicking a server opens its detail page with CPU/RAM/disk status, IP
|
||||
addresses, matching DNS names (looked up from the DNS module's cache), and
|
||||
its scheduled tasks — live hardware from Proxmox for VM/LXC-backed
|
||||
servers, or from the agent's own hardware report for everything else.
|
||||
Proxmox-linked servers also get start/stop/restart buttons right on the
|
||||
servers, or from the agent's own hardware report for everything else,
|
||||
both showing the same per-disk usage breakdown (an LXC's root filesystem
|
||||
read straight from the host; a QEMU VM's actual mounts via its guest
|
||||
agent, alongside the allocated size Proxmox already knew about without
|
||||
one). Proxmox-linked servers also get start/stop/restart buttons right on the
|
||||
detail page. The detail page also has an **Admin Links** section
|
||||
(operator/admin to add/edit/remove) for bookmarking that server's own
|
||||
admin UIs — Dockge, Webmin, Cockpit, Portainer, or anything else reachable
|
||||
|
||||
Reference in new issue
Block a user