mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
- Updates connection pooling settings to be read-only when a high availability project with ip4 admonition removed - Updates organization usage to be disabled until supported - Updates database publications to be disabled until supported <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added High Availability handling for database publications, usage, and connection pooling. * Publications and usage now display dedicated “unavailable” empty states and hide gated content when High Availability is enabled. * Connection pooling switches to managed/read-only mode on High Availability, disabling edits and form submission and disabling related data fetching. * Pooling mode controls are hidden on High Availability. * **Refactor** * Refactored database publications pages by extracting main rendering logic into internal components. * **Tests** * Added Vitest + React Testing Library coverage for High Availability behavior across publications availability, usage, connection pooling, and pooling modes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
24 lines
868 B
TypeScript
24 lines
868 B
TypeScript
import { BookOpen } from 'lucide-react'
|
|
import type { PropsWithChildren } from 'react'
|
|
|
|
import { HighAvailabilityDisabledEmptyState } from '@/components/ui/HighAvailability/HighAvailabilityDisabledEmptyState'
|
|
import { useHighAvailability } from '@/hooks/misc/useHighAvailability'
|
|
|
|
export const PublicationsAvailability = ({ children }: PropsWithChildren) => {
|
|
const { isHighAvailability } = useHighAvailability()
|
|
|
|
if (isHighAvailability) {
|
|
return (
|
|
<div className="flex h-full w-full items-center justify-center p-6">
|
|
<HighAvailabilityDisabledEmptyState
|
|
icon={BookOpen}
|
|
title="Publications unavailable on High Availability projects"
|
|
description="We're working to bring publications to High Availability projects. Contact support if this is blocking your work."
|
|
/>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
return children
|
|
}
|