The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
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.tsxindex 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 && (<FeaturePreviewSidebarPanelclassName="mx-4 mt-4"diff --git a/apps/studio/pages/project/[ref]/logs/index.tsx b/apps/studio/pages/project/[ref]/logs/index.tsxindex 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 changesuseEffect(() => {// 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 pageif (router.asPath !== `/project/${ref}/logs` && router.asPath.includes('/logs/')) {router.push(`/project/${ref}/logs`)