Expand dashboard by default (#6505)

This commit is contained in:
Yunzhi Zhang 2019-12-16 17:17:29 -08:00 committed by Philipp Moritz
parent 74b2e871b7
commit ce1c9a87a7
2 changed files with 3 additions and 1 deletions

View file

@ -146,6 +146,7 @@ class NodeInfo extends React.Component<
node={client} node={client}
logCounts={logCounts[client.ip]} logCounts={logCounts[client.ip]}
errorCounts={errorCounts[client.ip]} errorCounts={errorCounts[client.ip]}
initialExpanded={nodeInfo.clients.length <= 4}
/> />
))} ))}
<TotalRow <TotalRow

View file

@ -51,6 +51,7 @@ interface Props {
perWorker: { [pid: string]: number }; perWorker: { [pid: string]: number };
total: number; total: number;
}; };
initialExpanded: boolean;
} }
interface State { interface State {
@ -62,7 +63,7 @@ class NodeRowGroup extends React.Component<
State State
> { > {
state: State = { state: State = {
expanded: false expanded: this.props.initialExpanded
}; };
toggleExpand = () => { toggleExpand = () => {