From 6812e72348f30430a9a807d1947fd711eb7ba0ba Mon Sep 17 00:00:00 2001 From: sadnub Date: Sun, 10 Jan 2021 19:35:39 -0500 Subject: [PATCH] fix process sorting --- web/src/components/ProcessManager.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/components/ProcessManager.vue b/web/src/components/ProcessManager.vue index 6f52579a..7bd00d8e 100644 --- a/web/src/components/ProcessManager.vue +++ b/web/src/components/ProcessManager.vue @@ -109,6 +109,11 @@ export default { field: "memory_percent", align: "left", sortable: true, + sort: (a, b, rowA, rowB) => { + newA = parseFloat(a.replace(/[a-z]+/i, "")); + newB = parseFloat(b.replace(/[a-z]+/i, "")); + newB < newA; + }, }, { name: "username",