File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed
studio/components/interfaces/Database/Replication Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 11/// <reference types="next" />
22/// <reference types="next/image-types/global" />
3+ /// <reference path="./.next/types/routes.d.ts" />
34
45// NOTE: This file should not be edited
56// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { ReadReplicaForm } from './ReadReplicaForm'
1717
1818interface DestinationPanelProps {
1919 visible : boolean
20+ type ?: DestinationType
2021 existingDestination ?: {
2122 sourceId ?: number
2223 destinationId : number
@@ -29,13 +30,14 @@ interface DestinationPanelProps {
2930
3031export const DestinationPanel = ( {
3132 visible,
33+ type,
3234 existingDestination,
3335 onClose,
3436} : DestinationPanelProps ) => {
3537 const unifiedReplication = useFlag ( 'unifiedReplication' )
3638
3739 const [ selectedType , setSelectedType ] = useState < DestinationType > (
38- unifiedReplication ? 'Read Replica' : 'BigQuery'
40+ type || ( unifiedReplication ? 'Read Replica' : 'BigQuery' )
3941 )
4042
4143 const editMode = ! ! existingDestination
Original file line number Diff line number Diff line change 11import { useFlag } from 'common'
22import { AnalyticsBucket , BigQuery , Database } from 'icons'
33import { cn , RadioGroupStacked , RadioGroupStackedItem } from 'ui'
4- import { Admonition } from 'ui-patterns'
54import { DestinationType } from './DestinationPanel.types'
65
76type DestinationTypeSelectionProps = {
@@ -25,14 +24,11 @@ export const DestinationTypeSelection = ({
2524
2625 return (
2726 < div className = "px-5 py-5" >
28- < div className = "flex flex-col gap-y-2 mb-4" >
27+ < div className = "flex flex-col gap-y-1 mb-4" >
2928 < p className = "text-sm font-medium text-foreground" > Type</ p >
30- { editMode && (
31- < Admonition
32- type = "default"
33- title = "The destination type cannot be changed after creation"
34- />
35- ) }
29+ < p className = "text-foreground-light text-sm" >
30+ The destination type cannot be changed after creation
31+ </ p >
3632 </ div >
3733 < RadioGroupStacked
3834 disabled = { editMode }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ interface DestinationRowProps {
3232 sourceId ?: number
3333 destinationId : number
3434 destinationName : string
35- type : DestinationType | 'Other'
35+ type ? : DestinationType
3636 pipeline ?: Pipeline
3737 error : ResponseError | null
3838 isLoading : boolean
@@ -222,6 +222,7 @@ export const DestinationRow = ({
222222
223223 < DestinationPanel
224224 visible = { showEditDestinationPanel }
225+ type = { type }
225226 onClose = { ( ) => setShowEditDestinationPanel ( false ) }
226227 existingDestination = { {
227228 sourceId,
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ export const Destinations = () => {
171171 ? 'BigQuery'
172172 : 'iceberg' in destination . config
173173 ? 'Analytics Bucket'
174- : 'Other'
174+ : undefined
175175
176176 return (
177177 < DestinationRow
You can’t perform that action at this time.
0 commit comments