Skip to content

Commit

Permalink
WebUI: Sort queries on worker by descending reserved memory
Browse files Browse the repository at this point in the history
  • Loading branch information
takezoe authored and raunaqmorarka committed Jan 12, 2025
1 parent 223828d commit cc91dae
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,14 @@ export class WorkerStatus extends React.Component {
<div>
<table className="table">
<tbody>
{Object.keys(queries).map((key) =>
WorkerStatus.renderPoolQuery(key, queries[key][0], queries[key][1], size)
)}
{Object.entries(queries)
.sort(
([queryA, reservationsA], [queryB, reservationsB]) =>
reservationsB[0] - reservationsA[0]
)
.map(([query, reservations]) =>
WorkerStatus.renderPoolQuery(query, reservations[0], reservations[1], size)
)}
</tbody>
</table>
</div>
Expand Down

0 comments on commit cc91dae

Please sign in to comment.