if one logs dont show nested

This commit is contained in:
miloschwartz
2025-11-05 16:13:51 -08:00
parent c7787352c8
commit 9e2477587c
2 changed files with 38 additions and 28 deletions

View File

@@ -1517,8 +1517,8 @@
"resourceEditDomain": "Edit Domain", "resourceEditDomain": "Edit Domain",
"siteName": "Site Name", "siteName": "Site Name",
"proxyPort": "Port", "proxyPort": "Port",
"resourcesTableProxyResources": "Proxy Resources", "resourcesTableProxyResources": "Public",
"resourcesTableClientResources": "Client Resources", "resourcesTableClientResources": "Private",
"resourcesTableNoProxyResourcesFound": "No proxy resources found.", "resourcesTableNoProxyResourcesFound": "No proxy resources found.",
"resourcesTableNoInternalResourcesFound": "No internal resources found.", "resourcesTableNoInternalResourcesFound": "No internal resources found.",
"resourcesTableDestination": "Destination", "resourcesTableDestination": "Destination",

View File

@@ -126,11 +126,8 @@ export const orgNavSections = (
}, },
{ {
heading: "Analytics", heading: "Analytics",
items: [ items: (() => {
{ const logItems: SidebarNavItem[] = [
title: "sidebarLogs",
icon: <Logs className="h-4 w-4" />,
items: [
{ {
title: "sidebarLogsRequest", title: "sidebarLogsRequest",
href: "/{orgId}/settings/logs/request", href: "/{orgId}/settings/logs/request",
@@ -150,9 +147,22 @@ export const orgNavSections = (
} }
] ]
: []) : [])
] ];
// If only one log item, return it directly without grouping
if (logItems.length === 1) {
return logItems;
} }
]
// If multiple log items, create a group
return [
{
title: "sidebarLogs",
icon: <Logs className="h-4 w-4" />,
items: logItems
}
];
})()
}, },
{ {
heading: "Organization", heading: "Organization",