fix: update instance item type
This commit is contained in:
@@ -63,13 +63,29 @@ export interface InstanceServicePort {
|
|||||||
protocol?: InstanceServicePortProtocol;
|
protocol?: InstanceServicePortProtocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface InstanceStatusAllocationItem {
|
||||||
|
id: string;
|
||||||
|
manufacturer: string;
|
||||||
|
accelerators: [
|
||||||
|
{
|
||||||
|
id: string;
|
||||||
|
index: number;
|
||||||
|
mode: string;
|
||||||
|
allocated: number;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
export interface InstanceStatus {
|
export interface InstanceStatus {
|
||||||
namespace?: string;
|
namespace?: string;
|
||||||
phase?: string;
|
phase?: string;
|
||||||
phaseMessage?: string;
|
phaseMessage?: string;
|
||||||
|
nodeName?: string;
|
||||||
|
accessAddresses?: string[];
|
||||||
hostIPs?: InstanceIP[];
|
hostIPs?: InstanceIP[];
|
||||||
podIPs?: InstanceIP[];
|
podIPs?: InstanceIP[];
|
||||||
ports?: InstanceServicePort[];
|
ports?: InstanceServicePort[];
|
||||||
|
allocations?: InstanceStatusAllocationItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// instance list item
|
// instance list item
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ type ConnectEntry =
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getConnectEntries = (record: ListItem): 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 ports = record.status?.ports || [];
|
||||||
const configPorts = record.spec?.ports || [];
|
const configPorts = record.spec?.ports || [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user