Skip to content

Commit

Permalink
[Dashboard] avoid showing disk info when it is unavailable (ray-proje…
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtian authored May 25, 2022
1 parent 323605d commit f79b826
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dashboard/client/src/pages/dashboard/node-info/NodeInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ const NodeInfo: React.FC<{}> = () => {
// If a Ray node is running in a K8s pod, it marks available disk as 1 byte.
// (See ReporterAgent._get_disk_usage() in reporter_agent.py)
// Check if there are any nodes with realistic disk total:
const showDisk = nodes.filter((n) => n.disk["/"].total > 10).length !== 0;
const showDisk =
nodes.filter(
(n) => n !== undefined && n.disk !== undefined && n.disk["/"].total > 10,
).length !== 0;

const filterPredicate = (
feature: NodeInfoFeature | HeaderInfo<nodeInfoColumnId>,
Expand Down

0 comments on commit f79b826

Please sign in to comment.