mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Make dashboard disk stat not break on non-Unix machines (note it will not correctly report stat still) (#9962)
Co-authored-by: Max Fitton <max@semprehealth.com>
This commit is contained in:
parent
3f7eb64063
commit
fc9fc342cf
1 changed files with 4 additions and 2 deletions
|
@ -15,9 +15,11 @@ export const ClusterDisk: ClusterFeatureRenderFn = ({ nodes }) => {
|
|||
let used = 0;
|
||||
let total = 0;
|
||||
for (const node of nodes) {
|
||||
if ("/" in node.disk) {
|
||||
used += node.disk["/"].used;
|
||||
total += node.disk["/"].total;
|
||||
}
|
||||
}
|
||||
return (
|
||||
<UsageBar
|
||||
percent={(100 * used) / total}
|
||||
|
|
Loading…
Add table
Reference in a new issue