|
|
|
|
@ -670,11 +670,33 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
|
|
|
|
Object.values(
|
|
|
|
|
instanceData?.computed_resource_claim?.vram || {}
|
|
|
|
|
) as number[]
|
|
|
|
|
).reduce((acc, curr) => acc + curr, 0)
|
|
|
|
|
).reduce((acc, curr) => acc + curr, 0) +
|
|
|
|
|
(instanceData?.distributed_servers?.subordinate_workers?.reduce(
|
|
|
|
|
(accumulator, worker) => {
|
|
|
|
|
return (
|
|
|
|
|
accumulator +
|
|
|
|
|
(
|
|
|
|
|
Object.values(
|
|
|
|
|
worker?.computed_resource_claim?.vram || {}
|
|
|
|
|
) as number[]
|
|
|
|
|
).reduce((acc, curr) => acc + curr, 0)
|
|
|
|
|
); // 如果没有 vram,默认加 0
|
|
|
|
|
},
|
|
|
|
|
0
|
|
|
|
|
) || 0)
|
|
|
|
|
)}{' '}
|
|
|
|
|
/{' '}
|
|
|
|
|
{convertFileSize(
|
|
|
|
|
instanceData?.computed_resource_claim?.ram || 0
|
|
|
|
|
(instanceData?.computed_resource_claim?.ram || 0) +
|
|
|
|
|
(instanceData?.distributed_servers?.subordinate_workers?.reduce(
|
|
|
|
|
(accumulator, worker) => {
|
|
|
|
|
return (
|
|
|
|
|
accumulator +
|
|
|
|
|
(worker.computed_resource_claim?.ram || 0)
|
|
|
|
|
); // 如果没有 ram,默认加 0
|
|
|
|
|
},
|
|
|
|
|
0
|
|
|
|
|
) || 0)
|
|
|
|
|
)}
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
|