From 00ef72de90e43c12bd3fecdc08dfa1e3a4f881fb Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Sat, 1 Nov 2025 00:06:27 -0500 Subject: [PATCH] feat(servers): added a link to the server by clicking on the name and the gp code --- .../_app/_adminLayout/admin/servers.tsx | 93 +++++++++++++++++-- 1 file changed, 83 insertions(+), 10 deletions(-) diff --git a/frontend/src/routes/_app/_adminLayout/admin/servers.tsx b/frontend/src/routes/_app/_adminLayout/admin/servers.tsx index 521ac50..f5b2c5c 100644 --- a/frontend/src/routes/_app/_adminLayout/admin/servers.tsx +++ b/frontend/src/routes/_app/_adminLayout/admin/servers.tsx @@ -37,6 +37,7 @@ type ServerData = { pendingUpdateFile: string; lastUpdate: Date; memoryUsage: string; + greatPlainsPlantCode: string; }; const updateServerItem = async ( @@ -66,6 +67,10 @@ function RouteComponent() { ); const [sorting, setSorting] = useState([]); const columnHelper = createColumnHelper(); + const [pagination, setPagination] = useState({ + pageIndex: 0, //initial page index + pageSize: 20, //default page size + }); const statsMap = React.useMemo(() => { const map = new Map(); @@ -93,7 +98,20 @@ function RouteComponent() { const columns = [ columnHelper.accessor("name", { - cell: (i) => i.getValue(), + cell: ({ row, getValue }) => { + let url = ""; + if (row.original.plantToken.includes("test")) { + url = `https://${row.original.serverDNS}.alpla.net/lst/app`; + } else { + url = `https://${row.original.plantToken}prod.alpla.net/lst/app`; + } + + return ( + + {getValue()} + + ); + }, header: ({ column }) => { return (