From 91cacd62147eb880034c4bf3be72b81b2ec4d1f8 Mon Sep 17 00:00:00 2001 From: Alan Guo Date: Wed, 31 Aug 2022 19:05:24 -0700 Subject: [PATCH] Don't unfold first node in dashboard unless there is only one node in the cluster (#28108) fixes #28107 Also moves the Host / Cmd Line column to be the first column so nodes and workers can be more easily distinguished. --- dashboard/client/src/pages/node/NodeRow.tsx | 8 ++++---- dashboard/client/src/pages/node/index.tsx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dashboard/client/src/pages/node/NodeRow.tsx b/dashboard/client/src/pages/node/NodeRow.tsx index 2087e5c7b..b5916a641 100644 --- a/dashboard/client/src/pages/node/NodeRow.tsx +++ b/dashboard/client/src/pages/node/NodeRow.tsx @@ -65,6 +65,9 @@ const NodeRow = ({ node, expanded, onExpandButtonClick }: NodeRowProps) => { )} + + {hostname} + @@ -75,9 +78,6 @@ const NodeRow = ({ node, expanded, onExpandButtonClick }: NodeRowProps) => { - - {hostname} - {ip} @@ -165,6 +165,7 @@ const WorkerRow = ({ node, worker }: WorkerRowProps) => { {/* Empty because workers do not have an expand / unexpand button. */} + {cmdline[0]} @@ -175,7 +176,6 @@ const WorkerRow = ({ node, worker }: WorkerRowProps) => { )} - {cmdline[0]} {pid} diff --git a/dashboard/client/src/pages/node/index.tsx b/dashboard/client/src/pages/node/index.tsx index 156c3cfad..a4a889356 100644 --- a/dashboard/client/src/pages/node/index.tsx +++ b/dashboard/client/src/pages/node/index.tsx @@ -36,9 +36,9 @@ const useStyles = makeStyles((theme) => ({ const columns = [ "", // Expand button + "Host / Cmd Line", "State", "ID", - "Host / Cmd Line", "IP / PID", "CPU Usage", "Memory", @@ -283,7 +283,7 @@ const Nodes = () => { key={node.raylet.nodeId} node={node} isRefreshing={isRefreshing} - startExpanded={i === 0} + startExpanded={nodeList.length === 1} /> ))}