Report disk capacity in decimal GB so it matches Unraid and the drive label

The API mixes units per field — memory in bytes, disk size in KiB, fsSize and
fsUsed in kB — and one helper was guessing which from the magnitude of the
number, which also read any memory total under 100 GB as KB.
This commit is contained in:
Gmer4Lfe
2026-08-13 18:07:09 -04:00
parent 57e2b0d670
commit b358dfcf58
3 changed files with 48 additions and 23 deletions
+3 -1
View File
@@ -738,7 +738,9 @@ function vvTempColor(tempC, transport) {
return tempC >= crit ? '#f44336' : tempC >= warn ? '#ff9800' : '#4caf50';
}
function vvFmt(v) { return v >= 1024 ? (v / 1024).toFixed(1) + ' TB' : v + ' GB'; }
// Capacity only — size_gb/used_gb are decimal GB, so TB is 1000 of them. vvFmtGb below is the
// binary one and stays binary: it formats cumulative bytes read/written, not drive capacity.
function vvFmt(v) { return v >= 1000 ? (v / 1000).toFixed(1) + ' TB' : v + ' GB'; }
function vvFmtRate(mbs) {
if (mbs >= 1000) return (mbs / 1024).toFixed(1) + ' GB/s';