mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 04:45:08 +03:00
## 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 -->
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { Card, CardContent } from 'ui'
|
||
import {
|
||
PageSection,
|
||
PageSectionContent,
|
||
PageSectionDescription,
|
||
PageSectionMeta,
|
||
PageSectionSummary,
|
||
PageSectionTitle,
|
||
} from 'ui-patterns/PageSection'
|
||
|
||
import { ResetDbPasswordDialog } from './ResetDbPasswordDialog'
|
||
|
||
export const ResetDbPassword = ({ disabled = false }) => {
|
||
return (
|
||
<PageSection id="database-password">
|
||
<PageSectionMeta>
|
||
<PageSectionSummary>
|
||
<PageSectionTitle>Database password</PageSectionTitle>
|
||
|
||
<PageSectionDescription>Used for direct Postgres connections</PageSectionDescription>
|
||
</PageSectionSummary>
|
||
</PageSectionMeta>
|
||
<PageSectionContent>
|
||
<Card>
|
||
<CardContent className="flex flex-row items-center gap-x-2 justify-between">
|
||
<div className="space-y-0.5">
|
||
<h3 className="text-sm text-foreground">Reset database password</h3>
|
||
<p className="text-sm text-foreground-light text-balance">
|
||
The database password isn’t viewable after creation. Resetting it will break any
|
||
existing connections.
|
||
</p>
|
||
</div>
|
||
<ResetDbPasswordDialog disabled={disabled} />
|
||
</CardContent>
|
||
</Card>
|
||
</PageSectionContent>
|
||
</PageSection>
|
||
)
|
||
}
|
||
|
||
export default ResetDbPassword
|