diff --git a/ui/app/dto/MirrorsDTO.ts b/ui/app/dto/MirrorsDTO.ts index f63a93a15f..4a76200fd4 100644 --- a/ui/app/dto/MirrorsDTO.ts +++ b/ui/app/dto/MirrorsDTO.ts @@ -21,3 +21,10 @@ export type TableMapRow = { exclude: string[]; selected: boolean; }; + +export type SyncStatusRow = { + batchId: bigint; + startTime: Date; + endTime: Date | null; + numRows: number; +}; diff --git a/ui/app/mirrors/edit/[mirrorId]/cdc.tsx b/ui/app/mirrors/edit/[mirrorId]/cdc.tsx index 4afeedd5d4..89dc82329b 100644 --- a/ui/app/mirrors/edit/[mirrorId]/cdc.tsx +++ b/ui/app/mirrors/edit/[mirrorId]/cdc.tsx @@ -1,5 +1,6 @@ 'use client'; +import { SyncStatusRow } from '@/app/dto/MirrorsDTO'; import TimeLabel from '@/components/TimeComponent'; import { CDCMirrorStatus, @@ -272,13 +273,6 @@ const Trigger = styled( } `; -type SyncStatusRow = { - batchId: number; - startTime: Date; - endTime: Date | null; - numRows: number; -}; - type CDCMirrorStatusProps = { cdc: CDCMirrorStatus; rows: SyncStatusRow[]; diff --git a/ui/app/mirrors/edit/[mirrorId]/cdcDetails.tsx b/ui/app/mirrors/edit/[mirrorId]/cdcDetails.tsx index f52450ade0..32992f871d 100644 --- a/ui/app/mirrors/edit/[mirrorId]/cdcDetails.tsx +++ b/ui/app/mirrors/edit/[mirrorId]/cdcDetails.tsx @@ -1,4 +1,5 @@ 'use client'; +import { SyncStatusRow } from '@/app/dto/MirrorsDTO'; import MirrorInfo from '@/components/MirrorInfo'; import PeerButton from '@/components/PeerComponent'; import TimeLabel from '@/components/TimeComponent'; @@ -11,13 +12,6 @@ import moment from 'moment'; import MirrorValues from './configValues'; import TablePairs from './tablePairs'; -type SyncStatusRow = { - batchId: number; - startTime: Date; - endTime: Date | null; - numRows: number; -}; - type props = { syncs: SyncStatusRow[]; mirrorConfig: FlowConnectionConfigs | undefined; diff --git a/ui/app/mirrors/edit/[mirrorId]/cdcGraph.tsx b/ui/app/mirrors/edit/[mirrorId]/cdcGraph.tsx index e241a07ffc..a1c315459b 100644 --- a/ui/app/mirrors/edit/[mirrorId]/cdcGraph.tsx +++ b/ui/app/mirrors/edit/[mirrorId]/cdcGraph.tsx @@ -1,4 +1,5 @@ 'use client'; +import { SyncStatusRow } from '@/app/dto/MirrorsDTO'; import { formatGraphLabel, timeOptions } from '@/app/utils/graph'; import { Label } from '@/lib/Label'; import { BarChart } from '@tremor/react'; @@ -6,13 +7,6 @@ import { useEffect, useState } from 'react'; import ReactSelect from 'react-select'; import aggregateCountsByInterval from './aggregatedCountsByInterval'; -type SyncStatusRow = { - batchId: number; - startTime: Date; - endTime: Date | null; - numRows: number; -}; - function CdcGraph({ syncs }: { syncs: SyncStatusRow[] }) { let [aggregateType, setAggregateType] = useState('hour'); const initialCount: [string, number][] = []; diff --git a/ui/app/mirrors/edit/[mirrorId]/page.tsx b/ui/app/mirrors/edit/[mirrorId]/page.tsx index 756684b854..ca0adbd43a 100644 --- a/ui/app/mirrors/edit/[mirrorId]/page.tsx +++ b/ui/app/mirrors/edit/[mirrorId]/page.tsx @@ -65,7 +65,7 @@ export default async function EditMirror({ } const rows = syncs.map((sync) => ({ - batchId: sync.id, + batchId: sync.batch_id, startTime: sync.start_time, endTime: sync.end_time, numRows: sync.rows_in_batch, diff --git a/ui/app/mirrors/edit/[mirrorId]/syncStatus.tsx b/ui/app/mirrors/edit/[mirrorId]/syncStatus.tsx index 0a481241ca..d1cd51f2d1 100644 --- a/ui/app/mirrors/edit/[mirrorId]/syncStatus.tsx +++ b/ui/app/mirrors/edit/[mirrorId]/syncStatus.tsx @@ -32,7 +32,7 @@ export default async function SyncStatus({ }); const rows = syncs.map((sync) => ({ - batchId: sync.id, + batchId: sync.batch_id, startTime: sync.start_time, endTime: sync.end_time, numRows: sync.rows_in_batch, diff --git a/ui/app/mirrors/edit/[mirrorId]/syncStatusTable.tsx b/ui/app/mirrors/edit/[mirrorId]/syncStatusTable.tsx index e9b11bfa2d..d4da7c5920 100644 --- a/ui/app/mirrors/edit/[mirrorId]/syncStatusTable.tsx +++ b/ui/app/mirrors/edit/[mirrorId]/syncStatusTable.tsx @@ -1,5 +1,6 @@ 'use client'; +import { SyncStatusRow } from '@/app/dto/MirrorsDTO'; import TimeLabel from '@/components/TimeComponent'; import { Button } from '@/lib/Button'; import { Icon } from '@/lib/Icon'; @@ -10,12 +11,6 @@ import { Table, TableCell, TableRow } from '@/lib/Table'; import moment from 'moment'; import { useMemo, useState } from 'react'; import ReactSelect from 'react-select'; -type SyncStatusRow = { - batchId: number; - startTime: Date; - endTime: Date | null; - numRows: number; -}; type SyncStatusTableProps = { rows: SyncStatusRow[]; diff --git a/ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx b/ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx index 31f54b384d..ac070d744d 100644 --- a/ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx +++ b/ui/app/mirrors/status/qrep/[mirrorId]/qrepConfigViewer.tsx @@ -2,6 +2,7 @@ import prisma from '@/app/utils/prisma'; import { QRepConfig } from '@/grpc_generated/flow'; import { Badge } from '@/lib/Badge'; import { Icon } from '@/lib/Icon'; +import { Label } from '@/lib/Label'; import { ProgressCircle } from '@/lib/ProgressCircle'; export const dynamic = 'force-dynamic'; @@ -27,9 +28,9 @@ export default async function QRepConfigViewer({ if (!configBuffer?.config_proto) { return ( -