Skip to content

Commit

Permalink
fix: vGPU number not correct
Browse files Browse the repository at this point in the history
Signed-off-by: andy.lee <[email protected]>
(cherry picked from commit c4092c4)
  • Loading branch information
a110605 committed Jan 3, 2025
1 parent e1fa22b commit 911ecf3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ export default {
this[key] = res[key];
}
uniq([
const vGpus = this.vm.isOff ? [
...(this.value?.domain?.devices?.gpus || []).map(({ name }) => name),
] : [
...Object.values(this.vm?.provisionedVGpus).reduce((acc, gpus) => [...acc, ...gpus], [])
]).forEach((name) => {
];
uniq(vGpus).forEach((name) => {
if (this.enabledDevices.find(device => device?.metadata?.name === name)) {
this.selectedDevices.push(name);
}
Expand Down

0 comments on commit 911ecf3

Please sign in to comment.