Skip to content

Commit

Permalink
store: sort stages by id
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarshgupta137 authored and krishnan-r committed May 9, 2022
1 parent 83d79df commit a35015e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/job-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const StageItem = observer((props: { stageId: string }) => {

const StageTable = observer((props: { jobId: string }) => {
const notebook = useNotebookStore();
const stageIds = notebook.jobs[props.jobId].uniqueStageIds.slice(0).sort();
const stageIds = notebook.jobs[props.jobId].uniqueStageIds;
const rows = stageIds.map((stageId) => {
return <StageItem stageId={stageId} key={stageId} />;
});
Expand Down
1 change: 1 addition & 0 deletions src/store/notebook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export class NotebookStore {
stage.name = data.stageInfos[stageId].name;
job.uniqueStageIds.push(uniqueStageId);
});
job.uniqueStageIds.sort((a, b) => a.localeCompare(b, undefined, { numeric: true }));

if (job.name === 'null') {
const lastStageId = Math.max.apply(null, data.stageIds);
Expand Down

0 comments on commit a35015e

Please sign in to comment.