mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 13:11:43 +00:00
Merge pull request #126 from harvester/mergify/bp/release-harvester-v1.5/pr-125
fix: vGPU number not correct (backport #125)
This commit is contained in:
commit
2a3cd32447
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user