ui: fix gputype in add compute offering (#6646)

Fixes gpuType value in the add compute offering form during submit
This commit is contained in:
Abhishek Kumar 2022-08-17 11:53:22 +05:30 committed by GitHub
parent ef2997c4a8
commit 780bb2474c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -885,9 +885,9 @@ export default {
},
handleGpuChange (val) {
this.vGpuTypes = []
for (var i in this.gpuTypes) {
if (this.gpuTypes[i].value === val) {
this.vGpuTypes = this.gpuTypes[i].vgpu
for (var gpuType of this.gpuTypes) {
if (gpuType.value === val) {
this.vGpuTypes = gpuType.vgpu
break
}
}
@ -999,9 +999,7 @@ export default {
params['serviceofferingdetails[1].key'] = 'pciDevice'
params['serviceofferingdetails[1].value'] = values.pcidevice
}
if ('vgputype' in values &&
this.vGpuTypes !== null && this.vGpuTypes !== undefined &&
values.vgputype > this.vGpuTypes.length) {
if ('vgputype' in values && this.arrayHasItems(this.vGpuTypes)) {
params['serviceofferingdetails[2].key'] = 'vgpuType'
params['serviceofferingdetails[2].value'] = this.vGpuTypes[values.vgputype]
}