Skip to content

Commit

Permalink
fix qrep crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Feb 22, 2024
1 parent 51f4256 commit e097e59
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions ui/app/mirrors/edit/[mirrorId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ export default async function ViewMirror({
if (!mirrorInfo) {
return <div>No mirror info found</div>;
}
const mirrorConfig = FlowConnectionConfigs.decode(mirrorInfo.config_proto!);

let syncStatusChild = <></>;
let resyncDialogComponent = <></>;
if (mirrorStatus.cdcStatus) {
let rowsSynced = syncs.reduce((acc, sync) => {
if (sync.end_time !== null) {
Expand All @@ -85,6 +86,14 @@ export default async function ViewMirror({
syncStatusChild = (
<SyncStatus rowsSynced={rowsSynced} rows={rows} flowJobName={mirrorId} />
);

const mirrorConfig = FlowConnectionConfigs.decode(mirrorInfo.config_proto!);
resyncDialogComponent = (
<ResyncDialog
mirrorConfig={mirrorConfig}
workflowId={mirrorInfo.workflow_id || ''}
/>
);
} else {
redirect(`/mirrors/status/qrep/${mirrorId}`);
}
Expand All @@ -102,10 +111,7 @@ export default async function ViewMirror({
<div style={{ display: 'flex', alignItems: 'center' }}>
<Header variant='title2'>{mirrorId}</Header>
</div>
<ResyncDialog
mirrorConfig={mirrorConfig}
workflowId={mirrorInfo.workflow_id || ''}
/>
{resyncDialogComponent}
</div>
<CDCMirror
rows={rows}
Expand Down

0 comments on commit e097e59

Please sign in to comment.