diff --git a/flow/cmd/peer_data.go b/flow/cmd/peer_data.go index a0de4b665f..3fcdb179bb 100644 --- a/flow/cmd/peer_data.go +++ b/flow/cmd/peer_data.go @@ -40,7 +40,7 @@ func (h *FlowRequestHandler) GetSlotInfo( if err != nil { return &protos.PeerSlotResponse{SlotData: nil}, err } - + defer peerPool.Close() rows, err := peerPool.Query(ctx, "SELECT slot_name, redo_lsn::Text,restart_lsn::text,"+ "round((redo_lsn-restart_lsn) / 1024 / 1024 , 2) AS MB_Behind"+ " FROM pg_control_checkpoint(), pg_replication_slots;") @@ -79,7 +79,7 @@ func (h *FlowRequestHandler) GetStatInfo( if err != nil { return &protos.PeerStatResponse{StatData: nil}, err } - + defer peerPool.Close() rows, err := peerPool.Query(ctx, "SELECT pid, query, EXTRACT(epoch FROM(now()-query_start)) AS dur"+ " FROM pg_stat_activity WHERE query_start IS NOT NULL;") if err != nil { diff --git a/ui/app/peers/[peerName]/datatables.tsx b/ui/app/peers/[peerName]/datatables.tsx index 03df70f29c..96aff940b9 100644 --- a/ui/app/peers/[peerName]/datatables.tsx +++ b/ui/app/peers/[peerName]/datatables.tsx @@ -1,6 +1,5 @@ +import { CopyButton } from '@/components/CopyButton'; import { SlotInfo, StatInfo } from '@/grpc_generated/route'; -import { Button } from '@/lib/Button'; -import { Icon } from '@/lib/Icon'; import { Label } from '@/lib/Label'; import { Table, TableCell, TableRow } from '@/lib/Table'; import Link from 'next/link'; @@ -13,9 +12,11 @@ export const SlotTable = ({ data }: { data: SlotInfo[] }) => { return ''; }; return ( - <> -