diff --git a/frontend/src/pages/K8sResourceList.tsx b/frontend/src/pages/K8sResourceList.tsx index 9699626..02c36ed 100644 --- a/frontend/src/pages/K8sResourceList.tsx +++ b/frontend/src/pages/K8sResourceList.tsx @@ -318,7 +318,7 @@ export default function K8sResourceList() { case 'statefulset': return ['Name', 'Namespace', 'Replicas', 'Age', 'Actions'] case 'service': - return ['Name', 'Namespace', 'Type', 'Cluster IP', 'External IP', 'Ports', 'Age', 'Actions'] + return ['Name', 'Namespace', 'Type', 'Cluster IP', 'External IP', 'Ports', 'NodePort', 'Age', 'Actions'] case 'configmap': return ['Name', 'Namespace', 'Data Keys', 'Age', 'Actions'] case 'pod': @@ -385,6 +385,17 @@ export default function K8sResourceList() { ) case 'service': + // Format ports display + let portsDisplay = '-'; + let nodePortsDisplay = '-'; + if (spec.ports && spec.ports.length > 0) { + portsDisplay = spec.ports.map((p: any) => `${p.port}/${p.protocol}`).join(', '); + const nodePorts = spec.ports.filter((p: any) => p.nodePort).map((p: any) => p.nodePort); + if (nodePorts.length > 0) { + nodePortsDisplay = nodePorts.join(', '); + } + } + return ( {metadata.name || '-'} @@ -392,7 +403,8 @@ export default function K8sResourceList() { {spec.type || '-'} {spec.clusterIP || '-'} {spec.externalIPs?.join(', ') || status.loadBalancer?.ingress?.map((i: any) => i.ip || i.hostname).join(', ') || '-'} - {spec.ports?.map((p: any) => `${p.port}/${p.protocol}`).join(', ') || '-'} + {portsDisplay} + {nodePortsDisplay} {getAge(metadata.creationTimestamp)}