mirror of
https://github.com/supabase/supabase.git
synced 2026-09-06 09:59:03 +08:00
## Context As per PR title - brings Database Connections into feature preview Should be working for both hosted + self-host/local Also adjusts existing feature previews to remove "New" - Platform webhooks - Temporary database access <img width="600" alt="image" src="https://github.com/user-attachments/assets/b18ae8ca-ce0b-4649-975c-e70749a87dcd" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a Database Connections preview highlighting live activity, query blocking detection, session termination, and AI-assisted summaries. * Added access to project-specific observability connections from the preview. * Added a Database Connections entry to the observability menu when enabled. * **Improvements** * Updated feature previews and labels, including changes to “new” status indicators. * Added controls to manage Database Connections preview visibility. * **Bug Fixes** * Improved blocker detection so results respect the selected role filters. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
42 lines
1.5 KiB
TypeScript
42 lines
1.5 KiB
TypeScript
import { useParams } from 'common'
|
|
import Image from 'next/image'
|
|
|
|
import { InlineLink } from '@/components/ui/InlineLink'
|
|
import { BASE_PATH } from '@/lib/constants'
|
|
|
|
export const DatabaseConnectionsPreview = () => {
|
|
const { ref = '_' } = useParams()
|
|
|
|
return (
|
|
<div className="space-y-4">
|
|
<p className="text-sm text-foreground-light">
|
|
See every session on your database in real time, spot the ones that are slow, idle in a
|
|
transaction, or blocked, and terminate the one holding things up - all from{' '}
|
|
<InlineLink href={`/project/${ref}/observability/connections`}>
|
|
Database Connections
|
|
</InlineLink>
|
|
.
|
|
</p>
|
|
|
|
<Image
|
|
alt="database-connections-preview"
|
|
src={`${BASE_PATH}/img/previews/database-connections-preview.png`}
|
|
width={1200}
|
|
height={626}
|
|
className="rounded-sm border mb-4"
|
|
/>
|
|
|
|
<div className="space-y-2">
|
|
<p className="text-sm">Enabling this preview will:</p>
|
|
<ul className="list-disc pl-6 text-sm text-foreground-light space-y-1">
|
|
<li>Show live connection, query, and locking activity for your database</li>
|
|
<li>Flag queries that are idle in transaction, long-running, or blocked</li>
|
|
<li>Trace a blocked query back to the session actually holding the lock</li>
|
|
<li>Let you terminate a stuck session directly from the table</li>
|
|
<li>Summarize current activity on demand using the AI Assistant</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|