From 4127a943c1be1f3707c351337b4f2957952a5880 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Fri, 1 Dec 2023 22:26:56 +0530 Subject: [PATCH] remove conn string display --- ui/app/peers/[peerName]/page.tsx | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/ui/app/peers/[peerName]/page.tsx b/ui/app/peers/[peerName]/page.tsx index 4e88c5c3ee..78bd430bf3 100644 --- a/ui/app/peers/[peerName]/page.tsx +++ b/ui/app/peers/[peerName]/page.tsx @@ -1,36 +1,16 @@ -import { CopyButton } from '@/components/CopyButton'; import ReloadButton from '@/components/ReloadButton'; -import { PostgresConfig } from '@/grpc_generated/peers'; import { PeerSlotResponse, PeerStatResponse } from '@/grpc_generated/route'; import { Label } from '@/lib/Label'; import { GetFlowHttpAddressFromEnv } from '@/rpc/http'; import Link from 'next/link'; -import prisma from '../../utils/prisma'; import SlotTable from './slottable'; import StatTable from './stattable'; -import { connStringStyle } from './style'; export const dynamic = 'force-dynamic'; type DataConfigProps = { params: { peerName: string }; }; -async function fetchConnectionString(peerName: string) { - const config = await prisma.peers.findUnique({ - select: { - options: true, - }, - where: { - name: peerName, - }, - }); - if (config) { - const pgConfig = PostgresConfig.decode(config.options); - return `postgresql://${pgConfig.user}:${pgConfig.password}@${pgConfig.host}:${pgConfig.port}`; - } - return ''; -} - const PeerData = async ({ params: { peerName } }: DataConfigProps) => { const getSlotData = async () => { const flowServiceAddr = GetFlowHttpAddressFromEnv(); @@ -71,7 +51,6 @@ const PeerData = async ({ params: { peerName } }: DataConfigProps) => { const slots = await getSlotData(); const stats = await getStatData(); - const connectionString = await fetchConnectionString(peerName); return (
@@ -79,13 +58,6 @@ const PeerData = async ({ params: { peerName } }: DataConfigProps) => {
{peerName}
-
- -
- {connectionString} - -
-
{slots && stats ? (