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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user