import Link from 'next/link'; import { notFound } from 'next/navigation'; import { ArrowLeft, Server, Users } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { getClusterWithCustomers } from '@/lib/actions/clusters'; interface ClusterDetailPageProps { params: Promise<{ id: string; }>; } export default async function ClusterDetailPage({ params }: ClusterDetailPageProps) { const { id } = await params; const cluster = await getClusterWithCustomers(parseInt(id)); if (!cluster) { notFound(); } return (
Cluster Details
{cluster.kubeconfigPath}
{cluster.description}
{cluster.createdAt ? new Date(cluster.createdAt).toLocaleString() : 'N/A'}
No customers in this cluster yet.
) : ({customer.name}
{customer.namespace}