fix: update instance item type

This commit is contained in:
jialin
2026-05-28 15:51:51 +08:00
committed by jialin
parent b590aa746b
commit 9488fc1251
2 changed files with 17 additions and 1 deletions
@@ -63,13 +63,29 @@ export interface InstanceServicePort {
protocol?: InstanceServicePortProtocol;
}
export interface InstanceStatusAllocationItem {
id: string;
manufacturer: string;
accelerators: [
{
id: string;
index: number;
mode: string;
allocated: number;
}
];
}
export interface InstanceStatus {
namespace?: string;
phase?: string;
phaseMessage?: string;
nodeName?: string;
accessAddresses?: string[];
hostIPs?: InstanceIP[];
podIPs?: InstanceIP[];
ports?: InstanceServicePort[];
allocations?: InstanceStatusAllocationItem[];
}
// instance list item
@@ -33,7 +33,7 @@ type ConnectEntry =
};
const getConnectEntries = (record: ListItem): ConnectEntry[] => {
const ip = record.status?.hostIPs?.[0]?.ip;
const ip = record.status?.accessAddresses?.[0];
const ports = record.status?.ports || [];
const configPorts = record.spec?.ports || [];