diff --git a/ui/app/mirrors/[mirrorId]/configValues.ts b/ui/app/mirrors/[mirrorId]/configValues.ts index 6cf2d9f941..4e085e821f 100644 --- a/ui/app/mirrors/[mirrorId]/configValues.ts +++ b/ui/app/mirrors/[mirrorId]/configValues.ts @@ -34,6 +34,12 @@ const MirrorValues = (mirrorConfig: FlowConnectionConfigs | undefined) => { value: mirrorConfig?.script, label: 'Script', }, + { + value: + mirrorConfig?.publicationName || + `peerflow_pub_${mirrorConfig?.flowJobName}`, + label: 'Publication Name', + }, ]; }; export default MirrorValues; diff --git a/ui/app/mirrors/[mirrorId]/page.tsx b/ui/app/mirrors/[mirrorId]/page.tsx index d7a78f9187..1190d0ca57 100644 --- a/ui/app/mirrors/[mirrorId]/page.tsx +++ b/ui/app/mirrors/[mirrorId]/page.tsx @@ -91,13 +91,15 @@ export default async function ViewMirror({ ); const dbType = mirrorConfig.destination!.type; - const canResync = - dbType.valueOf() === DBType.BIGQUERY.valueOf() || - dbType.valueOf() === DBType.SNOWFLAKE.valueOf(); const isNotPaused = mirrorStatus.currentFlowState.toString() !== FlowStatus[FlowStatus.STATUS_PAUSED]; + const canResync = + mirrorStatus.currentFlowState.toString() !== + FlowStatus[FlowStatus.STATUS_SETUP] && + (dbType.valueOf() === DBType.BIGQUERY.valueOf() || + dbType.valueOf() === DBType.SNOWFLAKE.valueOf()); actionsDropdown = ( ({ label: value, value, })); +const allowedTypesForWatermarkColumn = [ + 'smallint', + 'integer', + 'bigint', + 'timestamp without time zone', + 'timestamp with time zone', +]; export default function QRepConfigForm({ settings, @@ -95,14 +102,17 @@ export default function QRepConfigForm({ schema, table, setLoading - ).then((cols) => + ).then((cols) => { + const filteredCols = cols?.filter((col) => + allowedTypesForWatermarkColumn.includes(col.split(':')[1]) + ); setWatermarkColumns( - cols?.map((col) => ({ + filteredCols.map((col) => ({ value: col.split(':')[0], label: `${col.split(':')[0]} (${col.split(':')[1]})`, })) - ) - ); + ); + }); }; const handleSourceChange = (