diff --git a/ui/app/mirrors/[mirrorId]/page.tsx b/ui/app/mirrors/[mirrorId]/page.tsx index 0ef2a43c66..523dbc8c3d 100644 --- a/ui/app/mirrors/[mirrorId]/page.tsx +++ b/ui/app/mirrors/[mirrorId]/page.tsx @@ -10,6 +10,7 @@ import { GetFlowHttpAddressFromEnv } from '@/rpc/http'; import { CDCMirror } from './cdc'; import NoMirror from './nomirror'; import QrepGraph from './qrepGraph'; +import QRepStatusButtons from './qrepStatusButtons'; import QRepStatusTable, { QRepPartitionStatus } from './qrepStatusTable'; import SyncStatus from './syncStatus'; @@ -31,17 +32,6 @@ async function getMirrorStatus(mirrorId: string) { return json; } -function setFlowState(flowJobName: string, requestedFlowState: FlowStatus) { - return fetch(`/api/mirrors/state_change`, { - method: 'POST', - body: JSON.stringify({ - flowJobName, - requestedFlowState, - }), - cache: 'no-store', - }); -} - export default async function ViewMirror({ params: { mirrorId }, }: EditMirrorProps) { @@ -182,16 +172,7 @@ export default async function ViewMirror({ }} >
{mirrorId}
- setFlowState(mirrorId, FlowStatus.STATUS_PAUSED)} - /> - setFlowState(mirrorId, FlowStatus.STATUS_RUNNING)} - /> +
Status: {mirrorStatus.currentFlowState}
+ setFlowState(props.mirrorId, FlowStatus.STATUS_PAUSED)} + /> + setFlowState(props.mirrorId, FlowStatus.STATUS_RUNNING)} + /> + + ); +}