diff --git a/apps/studio/components/interfaces/Sidebar.tsx b/apps/studio/components/interfaces/Sidebar.tsx
index afc27de6f8c..3b40d11085d 100644
--- a/apps/studio/components/interfaces/Sidebar.tsx
+++ b/apps/studio/components/interfaces/Sidebar.tsx
@@ -223,6 +223,7 @@ const ProjectLinks = () => {
const { securityLints, errorLints } = useLints()
const showWarehouse = useFlag('warehouse')
+ const showUnifiedLogs = useFlag('unifiedLogs')
const isSqlEditorTabsEnabled = useIsSQLEditorTabsEnabled()
const activeRoute = router.pathname.split('/')[3]
@@ -248,7 +249,7 @@ const ProjectLinks = () => {
storage: storageEnabled,
realtime: realtimeEnabled,
})
- const otherRoutes = generateOtherRoutes(ref, project)
+ const otherRoutes = generateOtherRoutes(ref, project, { unifiedLogs: showUnifiedLogs })
const settingsRoutes = generateSettingsRoutes(ref, project)
return (
diff --git a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx
index 83f7788a2ac..4ad4d706491 100644
--- a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.utils.tsx
@@ -122,10 +122,16 @@ export const generateProductRoutes = (
]
}
-export const generateOtherRoutes = (ref?: string, project?: Project): Route[] => {
+export const generateOtherRoutes = (
+ ref?: string,
+ project?: Project,
+ features?: { unifiedLogs?: boolean }
+): Route[] => {
const isProjectBuilding = project?.status === PROJECT_STATUS.COMING_UP
const buildingUrl = `/project/${ref}`
+ const showUnifiedLogs = features?.unifiedLogs ?? false
+
return [
{
key: 'advisors',
@@ -149,12 +155,16 @@ export const generateOtherRoutes = (ref?: string, project?: Project): Route[] =>
icon:
,
link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/logs`),
},
- {
- key: 'unified-logs',
- label: 'Unified Logs',
- icon: ,
- link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/unified-logs`),
- },
+ ...(showUnifiedLogs
+ ? [
+ {
+ key: 'unified-logs',
+ label: 'Unified Logs',
+ icon: ,
+ link: ref && (isProjectBuilding ? buildingUrl : `/project/${ref}/unified-logs`),
+ },
+ ]
+ : []),
{
key: 'api',
label: 'API Docs',