From f56cf55f042f51aeb500b9f35bebf8c4872a51c6 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Wed, 29 Nov 2023 15:16:11 -0500 Subject: [PATCH] fix(striker-ui-api): min VG sizes instead of sum when getting anvil node storage --- .../src/lib/request_handlers/anvil/getAnvilStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/striker-ui-api/src/lib/request_handlers/anvil/getAnvilStore.ts b/striker-ui-api/src/lib/request_handlers/anvil/getAnvilStore.ts index 7f2d6480..2b902e9b 100644 --- a/striker-ui-api/src/lib/request_handlers/anvil/getAnvilStore.ts +++ b/striker-ui-api/src/lib/request_handlers/anvil/getAnvilStore.ts @@ -43,8 +43,8 @@ export const getAnvilStore: RequestHandler< b.storage_group_name, d.scan_lvm_vg_size, d.scan_lvm_vg_free, - SUM(d.scan_lvm_vg_size) AS total_vg_size, - SUM(d.scan_lvm_vg_free) AS total_vg_free + MIN(d.scan_lvm_vg_size) AS total_vg_size, + MIN(d.scan_lvm_vg_free) AS total_vg_free FROM anvils AS a JOIN storage_groups AS b ON a.anvil_uuid = b.storage_group_anvil_uuid