Report disk sizes in the right unit and drop parity from the card
Two fixes to the Storage card.
Unraid's GraphQL reports fsSize/fsFree in KB, not bytes — the schema is
explicit about it ("(KB) Total Size of the FS"). We were passing those
straight to fmt_bytes as if they were bytes, so every figure came out
1024x too small and picked the unit below the right one: a 13 TB disk
rendered as "13.0 GB" and a 64.8 TB array as "64.8 GB". _fs_bytes() now
does the conversion at the point of reading, so everything downstream
still deals in bytes. The shutil fallback already returns real bytes and
deliberately doesn't go through it.
Parity is gone from the table and is no longer requested at all. It
mirrors the array rather than holding a filesystem — the schema notes
fsSize is "Not present on Parity type drive" — so it could only ever
render as a name, three em-dashes and a temperature, which earned little
for a whole row. Worth knowing: its temperature is no longer surfaced
anywhere, so a hot parity drive won't show up here.
Verified against the raw KB shape the API actually returns: an array of
3.7/11.2/13.0 TB disks now totals 27.9 TB rather than 27.9 GB, the sub-TB
cache still correctly reads in GB, and the local fallback still reports
this machine's real 228.3 GB rather than a 1024x-inflated figure.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
6f4958ba89
commit
5ef2502d4e
3 changed files with 24 additions and 31 deletions
|
|
@ -630,8 +630,8 @@ dd.is-accent { color: var(--accent); }
|
|||
text-align: right;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
/* Still used by the disk_state() macro when a disk reports no temperature. */
|
||||
.disk-null { color: var(--text-3); }
|
||||
.disk-table tr.is-parity th { color: var(--text-2); }
|
||||
@media (max-width: 720px) {
|
||||
/* Below this the six columns stop fitting; the table scrolls in its own
|
||||
container rather than squeezing the sizes into unreadable wraps. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue