From d84b60e2f0cdb0289155b0890f4f1c1dab6026c8 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:59:32 -0800 Subject: [PATCH] Fix: dont discard service groups not included in layout --- src/utils/config/api-response.js | 2 +- src/utils/config/service-helpers.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/config/api-response.js b/src/utils/config/api-response.js index 01bef3a1376..37c800551c2 100644 --- a/src/utils/config/api-response.js +++ b/src/utils/config/api-response.js @@ -171,7 +171,7 @@ export async function servicesResponse() { if (definedLayouts) { const layoutIndex = definedLayouts.findIndex((layout) => layout === mergedGroup.name); if (layoutIndex > -1) sortedGroups[layoutIndex] = mergedGroup; - else if (configuredGroup.name) { + else if (configuredGroup.parent) { // this is a nested group, so find the parent group and merge the services mergeSubgroups(configuredServices, mergedGroup); } else unsortedGroups.push(mergedGroup); diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index 0e3f6e3d7e1..02743682b5f 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -699,6 +699,7 @@ export function findGroupByName(groups, name) { } else if (group.groups) { const foundGroup = findGroupByName(group.groups, name); if (foundGroup) { + foundGroup.parent = group; return foundGroup; } }