Skip to content

Commit cee32ec

Browse files
committed
fix: codeflare top may fail due to Array(fractionalnumber)
1 parent f2f9a56 commit cee32ec

File tree

1 file changed

+6
-1
lines changed
  • plugins/plugin-codeflare-dashboard/src/components/Top

1 file changed

+6
-1
lines changed

Diff for: plugins/plugin-codeflare-dashboard/src/components/Top/JobBox.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ export default class JobBox extends React.PureComponent<Props> {
179179
<React.Fragment>
180180
{this.nCells(hosts.length, "node", "nodes", this.styleOfGroup({ color: "yellow" }))}
181181
{ValidResources.filter((resource) => stats.tot[resource] !== 0).map((resource) => this.resourceLine(resource))}
182-
{this.nCells(pods.length / hosts.length, "worker/node", "workers/node", this.styleOfGroup({ color: "white" }))}
182+
{this.nCells(
183+
Math.round(pods.length / hosts.length),
184+
"worker/node",
185+
"workers/node",
186+
this.styleOfGroup({ color: "white" })
187+
)}
183188
</React.Fragment>
184189
)
185190
}

0 commit comments

Comments
 (0)