Files
supabase/apps/studio/data/config/keys.ts
T
Joshen Lim 0044bb8e4f Add log configuration in database settings (#47212)
## Context

Adds a log configuration section under database settings, which exposes
2 toggles:
- Log connections
- Log disconnections

<img width="757" height="336" alt="image"
src="https://github.com/user-attachments/assets/e2615baf-f01b-43e2-b2a5-b106aacc59d9"
/>

UI changes are flagged for internal on prod

## To test
- [ ] Can toggle + save either options
- [ ] Configuration should load correctly with a refresh
- [ ] Should only be for hosted

Related docs PR: https://github.com/supabase/supabase/pull/47199

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added connection logging configuration for database projects, allowing
users to toggle logging of database connections and disconnections.
* The new settings UI is available on supported platforms and only when
the feature flag is enabled.
* Included backend-backed retrieval and updates for the PostgreSQL
configuration, with save/cancel behavior, form defaults, and
permission-aware controls.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-23 19:50:43 +08:00

33 lines
1.8 KiB
TypeScript

export const configKeys = {
settings: (projectRef: string | undefined) => ['projects', projectRef, 'settings'] as const,
settingsV2: (projectRef: string | undefined) => ['projects', projectRef, 'settings-v2'] as const,
api: (projectRef: string | undefined) => ['projects', projectRef, 'settings', 'api'] as const,
postgrest: (projectRef: string | undefined) => ['projects', projectRef, 'postgrest'] as const,
jwtSecretUpdatingStatus: (projectRef: string | undefined) =>
['projects', projectRef, 'jwt-secret-updating-status'] as const,
storage: (projectRef: string | undefined) => ['projects', projectRef, 'storage'] as const,
upgradeEligibility: (projectRef: string | undefined) =>
['projects', projectRef, 'upgrade-eligibility'] as const,
upgradeStatus: (projectRef: string | undefined) =>
['projects', projectRef, 'upgrade-status'] as const,
diskAttributes: (projectRef: string | undefined) =>
['projects', projectRef, 'disk-attributes'] as const,
diskBreakdown: (projectRef: string | undefined) =>
['projects', projectRef, 'disk-breakdown'] as const,
diskUtilization: (projectRef: string | undefined) =>
['projects', projectRef, 'disk-utilization'] as const,
projectCreationPostgresVersions: (
organizationSlug: string | undefined,
cloudProvider: string,
dbRegion: string
) =>
['projects', organizationSlug, cloudProvider, dbRegion, 'available-creation-versions'] as const,
projectUnpausePostgresVersions: (projectRef: string | undefined) =>
['projects', projectRef, 'available-unpause-versions'] as const,
diskAutoscaleConfig: (projectRef: string | undefined) =>
['projects', projectRef, 'disk-autoscale-config'] as const,
deploymentMode: () => ['deployment-mode'] as const,
postgresConfig: (projectRef: string | undefined) =>
['projects', projectRef, 'postgres-config'] as const,
}