mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-02-12 05:51:45 +01:00
revert column defaults,keep general desc default order
This commit is contained in:
@@ -72,22 +72,8 @@
|
||||
// Same Field, Change Direction
|
||||
sorting = { field: newField, direction: sorting.direction == "desc" ? "asc" : "desc" };
|
||||
} else {
|
||||
// Change Field, Apply Field Dependent Default
|
||||
switch (newField) {
|
||||
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 };
|
||||
}
|
||||
// Change Field, Apply Default Direction
|
||||
sorting = { field: newField, direction: "desc" };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user