mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Fix: dont discard service groups not included in layout (#4456)
This commit is contained in:
parent
f4adebca92
commit
ac39ffdc2f
@ -171,7 +171,7 @@ export async function servicesResponse() {
|
|||||||
if (definedLayouts) {
|
if (definedLayouts) {
|
||||||
const layoutIndex = definedLayouts.findIndex((layout) => layout === mergedGroup.name);
|
const layoutIndex = definedLayouts.findIndex((layout) => layout === mergedGroup.name);
|
||||||
if (layoutIndex > -1) sortedGroups[layoutIndex] = mergedGroup;
|
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
|
// this is a nested group, so find the parent group and merge the services
|
||||||
mergeSubgroups(configuredServices, mergedGroup);
|
mergeSubgroups(configuredServices, mergedGroup);
|
||||||
} else unsortedGroups.push(mergedGroup);
|
} else unsortedGroups.push(mergedGroup);
|
||||||
|
@ -699,6 +699,7 @@ export function findGroupByName(groups, name) {
|
|||||||
} else if (group.groups) {
|
} else if (group.groups) {
|
||||||
const foundGroup = findGroupByName(group.groups, name);
|
const foundGroup = findGroupByName(group.groups, name);
|
||||||
if (foundGroup) {
|
if (foundGroup) {
|
||||||
|
foundGroup.parent = group;
|
||||||
return foundGroup;
|
return foundGroup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user