From 08be3883226a8f28119a8b6a65168d5dce3a72a8 Mon Sep 17 00:00:00 2001 From: loveuer Date: Thu, 13 Nov 2025 10:31:55 +0800 Subject: [PATCH] fix: add edit buttons to resource table rows --- frontend/src/pages/K8sResourceList.tsx | 65 ++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/frontend/src/pages/K8sResourceList.tsx b/frontend/src/pages/K8sResourceList.tsx index f621f42..8fa4dad 100644 --- a/frontend/src/pages/K8sResourceList.tsx +++ b/frontend/src/pages/K8sResourceList.tsx @@ -363,6 +363,33 @@ export default function K8sResourceList() { {metadata.namespace || '-'} {`${status.readyReplicas || 0}/${spec.replicas || 0}`} {getAge(metadata.creationTimestamp)} + + + handleEditResource(metadata.name, metadata.namespace, selectedKind.label)} + > + + + + + handleViewLogs(metadata.name, metadata.namespace)} + > + + + + + openDeleteDialog(metadata.name, metadata.namespace)} + > + + + + ) case 'service': @@ -375,6 +402,25 @@ export default function K8sResourceList() { {spec.externalIPs?.join(', ') || status.loadBalancer?.ingress?.map((i: any) => i.ip || i.hostname).join(', ') || '-'} {spec.ports?.map((p: any) => `${p.port}/${p.protocol}`).join(', ') || '-'} {getAge(metadata.creationTimestamp)} + + + handleEditResource(metadata.name, metadata.namespace, selectedKind.label)} + > + + + + + openDeleteDialog(metadata.name, metadata.namespace)} + > + + + + ) case 'configmap': @@ -384,6 +430,25 @@ export default function K8sResourceList() { {metadata.namespace || '-'} {Object.keys(resource.data || {}).length} {getAge(metadata.creationTimestamp)} + + + handleEditResource(metadata.name, metadata.namespace, selectedKind.label)} + > + + + + + openDeleteDialog(metadata.name, metadata.namespace)} + > + + + + ) case 'pod':