From ccd383bcd5791907310d15562580351cf25f281c Mon Sep 17 00:00:00 2001 From: Max Fitton Date: Thu, 6 Aug 2020 10:38:01 -0700 Subject: [PATCH] [Dashboard] Fix Bug in Machine View when Unsorted with Multiple Machines (#9938) * Patch issue where when the Machine view was unsorted and grouped, it would crash. * lint Co-authored-by: Max Fitton --- .../client/src/pages/dashboard/node-info/NodeInfo.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/ray/dashboard/client/src/pages/dashboard/node-info/NodeInfo.tsx b/python/ray/dashboard/client/src/pages/dashboard/node-info/NodeInfo.tsx index 01766cc78..bfcb61299 100644 --- a/python/ray/dashboard/client/src/pages/dashboard/node-info/NodeInfo.tsx +++ b/python/ray/dashboard/client/src/pages/dashboard/node-info/NodeInfo.tsx @@ -70,7 +70,9 @@ const makeGroupedTableContents = ( rayletInfo: RayletInfoResponse | null, nodeInfoFeatures: NodeInfoFeature[], ) => { - const sortedGroups = stableSort(nodes, sortGroupComparator); + const sortedGroups = sortGroupComparator + ? stableSort(nodes, sortGroupComparator) + : nodes; return sortedGroups.map((node) => { const workerFeatureData: WorkerFeatureData[] = node.workers.map( (worker) => { @@ -183,7 +185,6 @@ const NodeInfo: React.FC<{}> = () => { const [orderBy, setOrderBy] = React.useState(null); const classes = useNodeInfoStyles(); const { nodeInfo, rayletInfo } = useSelector(nodeInfoSelector); - if (nodeInfo === null || rayletInfo === null) { return Loading...; }