The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat: supavisor logs support
TzeYiing9e8bd9b728da
diff --git a/packages/ui/src/components/Command/utils/shared-nav-items.json b/packages/ui/src/components/Command/utils/shared-nav-items.jsonindex 55b3767edaa..ef67f827328 100644--- a/packages/ui/src/components/Command/utils/shared-nav-items.json+++ b/packages/ui/src/components/Command/utils/shared-nav-items.json@@ -93,8 +93,8 @@"url": "https://supabase.com/dashboard/project/_/logs/postgrest-logs"},{- "label": "Postgres logs",- "url": "https://supabase.com/dashboard/project/_/logs/pgbouncer-logs"+ "label": "Pooler logs",+ "url": "https://supabase.com/dashboard/project/_/logs/pooler-logs"},{"label": "Auth logs logs",diff --git a/studio/components/interfaces/Settings/Logs/Logs.constants.ts b/studio/components/interfaces/Settings/Logs/Logs.constants.tsindex 0d65ccf9c74..80148fddf98 100644--- a/studio/components/interfaces/Settings/Logs/Logs.constants.ts+++ b/studio/components/interfaces/Settings/Logs/Logs.constants.ts@@ -303,6 +303,9 @@ export const SQL_FILTER_TEMPLATES: any = {pgbouncer_logs: {..._SQL_FILTER_COMMON,},+ supavisor_logs: {+ ..._SQL_FILTER_COMMON,+ },}export enum LogsTableName {@@ -315,6 +318,7 @@ export enum LogsTableName {STORAGE = 'storage_logs',PGBOUNCER = 'pgbouncer_logs',POSTGREST = 'postgrest_logs',+ SUPAVISOR = 'supavisor_logs',}export const LOGS_TABLES = {@@ -327,6 +331,7 @@ export const LOGS_TABLES = {storage: LogsTableName.STORAGE,postgrest: LogsTableName.POSTGREST,pgbouncer: LogsTableName.PGBOUNCER,+ supavisor: LogsTableName.SUPAVISOR,}export const LOGS_SOURCE_DESCRIPTION = {diff --git a/studio/components/interfaces/Settings/Logs/Logs.types.ts b/studio/components/interfaces/Settings/Logs/Logs.types.tsindex 955bc0364d0..8c5e5faf7ba 100644--- a/studio/components/interfaces/Settings/Logs/Logs.types.ts+++ b/studio/components/interfaces/Settings/Logs/Logs.types.ts@@ -85,6 +85,7 @@ export type QueryType =| 'auth'| 'realtime'| 'storage'+ | 'supavisor'| 'pgbouncer'| 'postgrest'diff --git a/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx b/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsxindex c04c02ec5d4..3dec21423a0 100644--- a/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx+++ b/studio/components/interfaces/Settings/Logs/LogsPreviewer.tsx@@ -166,9 +166,6 @@ export const LogsPreviewer = ({csvData={logData}isLoading={isLoading}newCount={newCount}- templates={TEMPLATES.filter(- (template) => queryType && template.for?.includes(queryType) && template.mode === 'simple'- )}onRefresh={handleRefresh}onSearch={handleSearch}defaultSearchValue={filters.search_query as string}diff --git a/studio/components/layouts/LogsLayout/LogsMenu.utils.ts b/studio/components/layouts/LogsLayout/LogsMenu.utils.tsindex 64920f230fb..043cb776c47 100644--- a/studio/components/layouts/LogsLayout/LogsMenu.utils.ts+++ b/studio/components/layouts/LogsLayout/LogsMenu.utils.ts@@ -44,9 +44,9 @@ export const generateLogsMenu = (project?: Project): ProductMenuGroup[] => {},IS_PLATFORM? {- name: 'PgBouncer',- key: 'pgbouncer-logs',- url: `/project/${ref}/logs/pgbouncer-logs`,+ name: 'Pooler',+ key: 'pooler-logs',+ url: `/project/${ref}/logs/pooler-logs`,items: [],}: null,diff --git a/studio/next.config.js b/studio/next.config.jsindex bd3c3cc86e8..5aa6af64357 100644--- a/studio/next.config.js+++ b/studio/next.config.js@@ -109,7 +109,12 @@ const nextConfig = {},{source: '/project/:ref/database/pgbouncer-logs',- destination: '/project/:ref/logs/pgbouncer-logs',+ destination: '/project/:ref/logs/pooler-logs',+ permanent: true,+ },+ {+ source: '/project/:ref/logs/pgbouncer-logs',+ destination: '/project/:ref/logs/pooler-logs',permanent: true,},{diff --git a/studio/pages/project/[ref]/logs/pgbouncer-logs.tsx b/studio/pages/project/[ref]/logs/pooler-logs.tsxsimilarity index 64%rename from studio/pages/project/[ref]/logs/pgbouncer-logs.tsxrename to studio/pages/project/[ref]/logs/pooler-logs.tsxindex 17a449d1579..fb358e4a357 100644--- a/studio/pages/project/[ref]/logs/pgbouncer-logs.tsx+++ b/studio/pages/project/[ref]/logs/pooler-logs.tsx@@ -22,21 +22,9 @@ export const LogPage: NextPageWithLayout = () => {<LogsPreviewerprojectRef={ref as string}condensedLayout={true}- tableName={LogsTableName.PGBOUNCER}- queryType="pgbouncer"- >- {isSupavisorEnabled && (- <div className="px-4 pt-4">- <Alert_Shadcn_ variant="warning">- <IconAlertCircle />- <AlertTitle_Shadcn_>Supavisor logs are not available yet</AlertTitle_Shadcn_>- <AlertDescription_Shadcn_>- Your project currently has Supavisor enabled, which logs are currently unavailable.- </AlertDescription_Shadcn_>- </Alert_Shadcn_>- </div>- )}- </LogsPreviewer>+ tableName={isSupavisorEnabled ? LogsTableName.SUPAVISOR : LogsTableName.PGBOUNCER}+ queryType={isSupavisorEnabled? "supavisor" : "pgbouncer"}+ />)}diff --git a/studio/tests/pages/projects/LogsPreviewer.test.js b/studio/tests/pages/projects/LogsPreviewer.test.jsindex 0dd9e6bd225..4a70f53a7f7 100644--- a/studio/tests/pages/projects/LogsPreviewer.test.js+++ b/studio/tests/pages/projects/LogsPreviewer.test.js@@ -115,7 +115,7 @@ test.each([],},// these all use teh default selection/table renderers- ...['pgbouncer', 'postgrest', 'storage', 'realtime'].map((queryType) => ({+ ...['pgbouncer', 'postgrest', 'storage', 'realtime', "pooler"].map((queryType) => ({queryType,tableName: undefined,tableLog: logDataFixture({