()
| 606 | } |
| 607 | |
| 608 | async function loadGpus() { |
| 609 | try { |
| 610 | const data = await vmmRpc.listGpus({}); |
| 611 | const gpus = data.gpus || []; |
| 612 | availableGpus.value = gpus; |
| 613 | availableGpuProducts.value = []; |
| 614 | allowAttachAllGpus.value = data.allow_attach_all; |
| 615 | for (const gpu of gpus) { |
| 616 | if (!availableGpuProducts.value.find((product) => product.product_id === gpu.product_id)) { |
| 617 | availableGpuProducts.value.push(gpu); |
| 618 | } |
| 619 | } |
| 620 | } catch (error) { |
| 621 | recordError('error loading GPUs', error); |
| 622 | } |
| 623 | } |
| 624 | |
| 625 | async function loadVersion() { |
| 626 | const data = await vmmRpc.version({}); |
no test coverage detected