From 4fab8e82e674333920b845324d38aaddd55ea0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Fri, 1 Nov 2024 00:43:25 +0000 Subject: [PATCH] remove sort field --- ui/app/mirrors/[mirrorId]/syncStatusTable.tsx | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/ui/app/mirrors/[mirrorId]/syncStatusTable.tsx b/ui/app/mirrors/[mirrorId]/syncStatusTable.tsx index feacf47d1c..9b8b86ff16 100644 --- a/ui/app/mirrors/[mirrorId]/syncStatusTable.tsx +++ b/ui/app/mirrors/[mirrorId]/syncStatusTable.tsx @@ -1,6 +1,5 @@ 'use client'; -import SelectTheme from '@/app/styles/select'; import TimeLabel from '@/components/TimeComponent'; import { CDCBatch, @@ -14,7 +13,6 @@ import { ProgressCircle } from '@/lib/ProgressCircle'; import { Table, TableCell, TableRow } from '@/lib/Table'; import moment from 'moment'; import { useCallback, useEffect, useState } from 'react'; -import ReactSelect from 'react-select'; import { RowDataFormatter } from './rowsDisplay'; type SyncStatusTableProps = { mirrorName: string }; @@ -47,18 +45,7 @@ function TimeWithDurationOrRunning({ } const ROWS_PER_PAGE = 5; -const sortOptions = [ - { value: 'batchId', label: 'Batch ID' }, - { value: 'startTime', label: 'Start Time' }, - { value: 'endTime', label: 'End Time' }, - { value: 'numRows', label: 'Rows Synced' }, -]; - export const SyncStatusTable = ({ mirrorName }: SyncStatusTableProps) => { - const [sortField, setSortField] = useState< - 'startTime' | 'endTime' | 'numRows' | 'batchId' - >('batchId'); - const [totalPages, setTotalPages] = useState(1); const [currentPage, setCurrentPage] = useState(1); const [ascending, setAscending] = useState(false); @@ -70,7 +57,6 @@ export const SyncStatusTable = ({ mirrorName }: SyncStatusTableProps) => { const req: GetCDCBatchesRequest = { flowJobName: mirrorName, limit: ROWS_PER_PAGE, - // TODO sortField beforeId: beforeId, afterId: afterId, ascending, @@ -90,7 +76,7 @@ export const SyncStatusTable = ({ mirrorName }: SyncStatusTableProps) => { }; fetchData(); - }, [mirrorName, sortField, beforeId, afterId]); + }, [mirrorName, beforeId, afterId]); const nextPage = useCallback(() => { if (batches.length === 0) { @@ -130,27 +116,6 @@ export const SyncStatusTable = ({ mirrorName }: SyncStatusTableProps) => { > -
- opt.value === sortField) - ?.label, - }} - onChange={(val, _) => { - const sortVal = - (val?.value as - | 'startTime' - | 'endTime' - | 'numRows' - | 'batchId') ?? 'batchId'; - setSortField(sortVal); - }} - defaultValue={{ value: 'batchId', label: 'Batch ID' }} - theme={SelectTheme} - /> -