From a3c40828001c73a02d791f31ac8ee62dae530fe0 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sun, 3 Dec 2023 21:24:06 +0800 Subject: [PATCH] Sort non managed stack to the end (#228) --- frontend/src/components/StackList.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/src/components/StackList.vue b/frontend/src/components/StackList.vue index 90edb2f..51bb8e0 100644 --- a/frontend/src/components/StackList.vue +++ b/frontend/src/components/StackList.vue @@ -152,6 +152,14 @@ export default { }); result.sort((m1, m2) => { + + // sort by managed by dockge + if (m1.isManagedByDockge && !m2.isManagedByDockge) { + return -1; + } else if (!m1.isManagedByDockge && m2.isManagedByDockge) { + return 1; + } + if (m1.status !== m2.status) { if (m2.status === RUNNING) { return 1;