diff --git a/src/api.ts b/src/api.ts index 6ecc90c..26514c8 100644 --- a/src/api.ts +++ b/src/api.ts @@ -68,9 +68,6 @@ export interface VmInstance { ssh_key_id: number; created: string; expires: string; - cpu: number; - memory: number; - disk_size: number; disk_id: number; status?: VmStatus; mac_address: string; diff --git a/src/components/vps-resources.tsx b/src/components/vps-resources.tsx index 39e7cfd..e400149 100644 --- a/src/components/vps-resources.tsx +++ b/src/components/vps-resources.tsx @@ -6,11 +6,12 @@ export default function VpsResources({ vm }: { vm: VmInstance | VmTemplate }) { const region = "region_id" in vm ? vm.region?.name : vm.template?.region?.name; const status = "status" in vm ? vm.status : undefined; + const template = "template" in vm ? vm.template : vm as VmTemplate; return ( <>