Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix unified logs stuff on self-hosted (#37394)

Joshen Limec6564b782f7
diff --git a/apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx b/apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx
index 8f6d7571d47..86f999ecd7f 100644
--- a/apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx
+++ b/apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx
@@ -229,19 +229,21 @@ export function LogsSidebarMenuV2() {
return (
<div className="pb-12 relative">
- <FeaturePreviewSidebarPanel
- className="mx-4 mt-4"
- illustration={<Badge variant="default">Coming soon</Badge>}
- title="New logs"
- description="Get early access"
- actions={
- <Link href="https://forms.supabase.com/unified-logs-signup" target="_blank">
- <Button type="default" size="tiny">
- Early access
- </Button>
- </Link>
- }
- />
+ {IS_PLATFORM && (
+ <FeaturePreviewSidebarPanel
+ className="mx-4 mt-4"
+ illustration={<Badge variant="default">Coming soon</Badge>}
+ title="New logs"
+ description="Get early access"
+ actions={
+ <Link href="https://forms.supabase.com/unified-logs-signup" target="_blank">
+ <Button type="default" size="tiny">
+ Early access
+ </Button>
+ </Link>
+ }
+ />
+ )}
{isUnifiedLogsPreviewAvailable && (
<FeaturePreviewSidebarPanel
className="mx-4 mt-4"
diff --git a/apps/studio/pages/project/[ref]/logs/index.tsx b/apps/studio/pages/project/[ref]/logs/index.tsx
index 8454db4cfaa..26217594cb8 100644
--- a/apps/studio/pages/project/[ref]/logs/index.tsx
+++ b/apps/studio/pages/project/[ref]/logs/index.tsx
@@ -9,6 +9,7 @@ import LogsLayout from 'components/layouts/LogsLayout/LogsLayout'
import ProjectLayout from 'components/layouts/ProjectLayout/ProjectLayout'
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
+import { IS_PLATFORM } from 'lib/constants'
import type { NextPageWithLayout } from 'types'
export const LogPage: NextPageWithLayout = () => {
@@ -33,9 +34,9 @@ export const LogPage: NextPageWithLayout = () => {
// Handle redirects when unified logs preview flag changes
useEffect(() => {
// Only handle redirects if we're currently on a logs page
- if (!router.asPath.includes('/logs') || !hasLoaded) return
+ if (!router.asPath.includes('/logs') || (IS_PLATFORM && !hasLoaded)) return
- if (isUnifiedLogsEnabled) {
+ if (IS_PLATFORM && isUnifiedLogsEnabled) {
// If unified logs preview is enabled and we're not already on the main logs page
if (router.asPath !== `/project/${ref}/logs` && router.asPath.includes('/logs/')) {
router.push(`/project/${ref}/logs`)