mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-02-11 13:31:45 +01:00
revert column defaults,keep general desc default order
This commit is contained in:
@@ -72,22 +72,8 @@
|
|||||||
// Same Field, Change Direction
|
// Same Field, Change Direction
|
||||||
sorting = { field: newField, direction: sorting.direction == "desc" ? "asc" : "desc" };
|
sorting = { field: newField, direction: sorting.direction == "desc" ? "asc" : "desc" };
|
||||||
} else {
|
} else {
|
||||||
// Change Field, Apply Field Dependent Default
|
// Change Field, Apply Default Direction
|
||||||
switch (newField) {
|
sorting = { field: newField, direction: "desc" };
|
||||||
case "id":
|
|
||||||
case "name":
|
|
||||||
case "totalJobs":
|
|
||||||
case "totalWalltime":
|
|
||||||
sorting = { field: newField, direction: "desc" };
|
|
||||||
break
|
|
||||||
case "totalCoreHours":
|
|
||||||
case "totalAccHours":
|
|
||||||
sorting = { field: newField, direction: "asc" };
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
// Fallback: Change only Field
|
|
||||||
sorting = { field: newField, direction: sorting.direction };
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user