Skip to content

Commit

Permalink
UI: enable initial load options for non-EH queues (#1683)
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex authored May 9, 2024
1 parent e551e73 commit 9d74565
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ui/app/mirrors/create/cdc/cdc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down
10 changes: 4 additions & 6 deletions ui/app/mirrors/create/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
};

Expand Down

0 comments on commit 9d74565

Please sign in to comment.