fix: resolve bugs in ServicesPage, NodesPage, and k8s helpers

- Add missing useEffect dependency array and useCallback for closePanel
- Fix invalid StatusLabel status="" to "info" for non-kube-vip services
- Add ARIA dialog attributes to service detail panel
- Use phaseToStatus() in NodesPage instead of hardcoded Running check
- Remove dead code in getNodeVipLabel (label keys never contain =)
- Simplify redundant lease lookup in OverviewPage
- Fix 46 ESLint indentation warnings
- Add CHANGELOG.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
DevContainer User
2026-03-04 12:43:23 +00:00
parent aa676e8300
commit f26d1414b2
8 changed files with 113 additions and 70 deletions
+3 -2
View File
@@ -20,6 +20,7 @@ import {
getNodeVipLabel,
isControlPlaneNode,
isNodeReady,
phaseToStatus,
} from '../api/k8s';
import { useKubeVipContext } from '../api/KubeVipDataContext';
@@ -83,7 +84,7 @@ export default function NodesPage() {
const pod = podByNode.get(n.metadata.name);
if (!pod) return '—';
return (
<StatusLabel status={pod.status?.phase === 'Running' ? 'success' : 'warning'}>
<StatusLabel status={phaseToStatus(pod.status?.phase)}>
{pod.status?.phase ?? 'Unknown'}
</StatusLabel>
);
@@ -127,7 +128,7 @@ export default function NodesPage() {
const pod = podByNode.get(n.metadata.name);
if (!pod) return '—';
return (
<StatusLabel status={pod.status?.phase === 'Running' ? 'success' : 'warning'}>
<StatusLabel status={phaseToStatus(pod.status?.phase)}>
{pod.status?.phase ?? 'Unknown'}
</StatusLabel>
);