Commit d61015d
committed
Fix Dashboard Disk card showing blank value and wrong bar width
The Dashboard template (index.html) calls ramPct() and diskPct() as
methods, but dashboardPage() never defined them - Alpine threw a
silent ReferenceError on these bindings. This left the Disk card's big
percentage value empty, and since the bar's :style binding also failed,
the fill defaulted to a near-full width regardless of actual usage
(visible as an orange bar that looked ~90% full despite '6.5 GB /
57.1 GB' being ~11%). RAM's big value was unaffected since it reads
stats.ram.used directly (fmtBytes), but its bar width had the same
issue. Added both methods, computing percentage from
stats.{ram,disk}.{used,total} which /api/dashboard/stats already
provides.1 parent e9e941a commit d61015d
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
0 commit comments