mirror of
https://github.com/supabase/supabase.git
synced 2026-07-14 03:30:05 -04:00
e1ccc31fcc
This PR disables the following features on Multigres projects <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Enhanced replication interface with improved visual states. * **Bug Fixes** * Added validation to prevent incompatible database configuration combinations. * **Changes** * High Availability projects now display informational notices indicating unavailable features: Realtime, Replication, and PITR backups. * **Removed** * Removed redundant UI component from the application. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
58 lines
1.5 KiB
TypeScript
58 lines
1.5 KiB
TypeScript
import { Background, ColorMode, ReactFlow, ReactFlowProvider } from '@xyflow/react'
|
|
import { useTheme } from 'next-themes'
|
|
|
|
import { PrimaryDatabaseNode, ReadReplicaNode, ReplicationNode } from './Nodes'
|
|
|
|
import '@xyflow/react/dist/style.css'
|
|
|
|
import { SmoothstepEdge } from './Edges'
|
|
|
|
export const EmptyReplicationDiagram = () => {
|
|
return (
|
|
<ReactFlowProvider>
|
|
<ReplicationDiagramContent />
|
|
</ReactFlowProvider>
|
|
)
|
|
}
|
|
|
|
const nodeTypes = {
|
|
primary: PrimaryDatabaseNode,
|
|
replication: ReplicationNode,
|
|
readReplica: ReadReplicaNode,
|
|
}
|
|
|
|
const edgeTypes = { smoothstep: SmoothstepEdge }
|
|
|
|
const ReplicationDiagramContent = () => {
|
|
const { resolvedTheme } = useTheme()
|
|
|
|
const backgroundPatternColor =
|
|
resolvedTheme === 'dark' ? 'rgba(255, 255, 255, 0.3)' : 'rgba(0, 0, 0, 0.4)'
|
|
|
|
return (
|
|
<div className="nowheel relative min-h-[350px]">
|
|
<ReactFlow
|
|
// FIXME: https://github.com/xyflow/xyflow/issues/4876
|
|
colorMode={'' as unknown as ColorMode}
|
|
fitView
|
|
fitViewOptions={{ minZoom: 0.8, maxZoom: 0.9 }}
|
|
className="bg"
|
|
zoomOnPinch={false}
|
|
zoomOnScroll={false}
|
|
nodesDraggable={false}
|
|
nodesConnectable={false}
|
|
zoomOnDoubleClick={false}
|
|
edgesFocusable={false}
|
|
edgesReconnectable={false}
|
|
defaultNodes={[]}
|
|
defaultEdges={[]}
|
|
nodeTypes={nodeTypes}
|
|
edgeTypes={edgeTypes}
|
|
proOptions={{ hideAttribution: true }}
|
|
>
|
|
<Background color={backgroundPatternColor} />
|
|
</ReactFlow>
|
|
</div>
|
|
)
|
|
}
|