From 9e2477587cb0ac14f2d96268d46b9a8b1a40977c Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Wed, 5 Nov 2025 16:13:51 -0800 Subject: [PATCH] if one logs dont show nested --- messages/en-US.json | 4 +-- src/app/navigation.tsx | 62 ++++++++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/messages/en-US.json b/messages/en-US.json index b782bf9d..3470b334 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -1517,8 +1517,8 @@ "resourceEditDomain": "Edit Domain", "siteName": "Site Name", "proxyPort": "Port", - "resourcesTableProxyResources": "Proxy Resources", - "resourcesTableClientResources": "Client Resources", + "resourcesTableProxyResources": "Public", + "resourcesTableClientResources": "Private", "resourcesTableNoProxyResourcesFound": "No proxy resources found.", "resourcesTableNoInternalResourcesFound": "No internal resources found.", "resourcesTableDestination": "Destination", diff --git a/src/app/navigation.tsx b/src/app/navigation.tsx index 6941b39b..debf9b74 100644 --- a/src/app/navigation.tsx +++ b/src/app/navigation.tsx @@ -126,33 +126,43 @@ export const orgNavSections = ( }, { heading: "Analytics", - items: [ - { - title: "sidebarLogs", - icon: , - items: [ - { - title: "sidebarLogsRequest", - href: "/{orgId}/settings/logs/request", - icon: - }, - ...(build != "oss" - ? [ - { - title: "sidebarLogsAccess", - href: "/{orgId}/settings/logs/access", - icon: - }, - { - title: "sidebarLogsAction", - href: "/{orgId}/settings/logs/action", - icon: - } - ] - : []) - ] + items: (() => { + const logItems: SidebarNavItem[] = [ + { + title: "sidebarLogsRequest", + href: "/{orgId}/settings/logs/request", + icon: + }, + ...(build != "oss" + ? [ + { + title: "sidebarLogsAccess", + href: "/{orgId}/settings/logs/access", + icon: + }, + { + title: "sidebarLogsAction", + href: "/{orgId}/settings/logs/action", + icon: + } + ] + : []) + ]; + + // 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: , + items: logItems + } + ]; + })() }, { heading: "Organization",