[ui] sort jobs by type (major jobs are shown first)
This commit is contained in:
parent
1aa779e816
commit
e8af838020
2 changed files with 3 additions and 1 deletions
|
@ -64,6 +64,7 @@ export interface IFile {
|
||||||
|
|
||||||
export interface IJob {
|
export interface IJob {
|
||||||
title: string;
|
title: string;
|
||||||
|
job_type: string;
|
||||||
progress: number;
|
progress: number;
|
||||||
state: "InProgress" | "Done" | "Failed";
|
state: "InProgress" | "Done" | "Failed";
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
.map(([id, job]) => {
|
.map(([id, job]) => {
|
||||||
return { id, ...job };
|
return { id, ...job };
|
||||||
})
|
})
|
||||||
.sort((j1, j2) => j1.id.localeCompare(j2.id));
|
.sort((j1, j2) => j1.id.localeCompare(j2.id))
|
||||||
|
.sort((j1, j2) => (j2.job_type || "").localeCompare(j1.job_type || ""));
|
||||||
|
|
||||||
if (activeJobs.length) {
|
if (activeJobs.length) {
|
||||||
timeout = setTimeout(updateJobs, 500);
|
timeout = setTimeout(updateJobs, 500);
|
||||||
|
|
Loading…
Reference in a new issue