From 4435f18b812a6917e26f5cd8f44f65d9518fc910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Tue, 7 May 2024 17:16:18 +0000 Subject: [PATCH] UI: enable initial load options for non-EH queues --- ui/app/mirrors/create/cdc/cdc.tsx | 4 ++-- ui/app/mirrors/create/handlers.ts | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ui/app/mirrors/create/cdc/cdc.tsx b/ui/app/mirrors/create/cdc/cdc.tsx index 2ef76be5be..d56b6d4ece 100644 --- a/ui/app/mirrors/create/cdc/cdc.tsx +++ b/ui/app/mirrors/create/cdc/cdc.tsx @@ -83,10 +83,10 @@ export default function CDCConfigForm({ !isQueue) || (label.includes('staging path') && defaultSyncMode(mirrorConfig.destination?.type) !== 'AVRO') || - (isQueue && + (isQueue && label.includes('soft delete')) || + (mirrorConfig.destination?.type === DBType.EVENTHUBS && (label.includes('initial copy') || label.includes('initial load') || - label.includes('soft delete') || label.includes('snapshot'))) || ((mirrorConfig.source?.type !== DBType.POSTGRES || mirrorConfig.destination?.type !== DBType.POSTGRES) && diff --git a/ui/app/mirrors/create/handlers.ts b/ui/app/mirrors/create/handlers.ts index d924dc2588..1c45210c4d 100644 --- a/ui/app/mirrors/create/handlers.ts +++ b/ui/app/mirrors/create/handlers.ts @@ -25,13 +25,11 @@ import { } from './schema'; export const IsQueuePeer = (peerType?: DBType): boolean => { - if (!peerType) { - return false; - } return ( - peerType === DBType.KAFKA || - peerType === DBType.PUBSUB || - peerType === DBType.EVENTHUBS + !!peerType && + (peerType === DBType.KAFKA || + peerType === DBType.PUBSUB || + peerType === DBType.EVENTHUBS) ); };