ui: fix vmware nicadapter detail for register template (#8173)

This PR Fixes: #7864
This commit is contained in:
dahn 2023-11-09 07:03:30 +01:00 committed by GitHub
parent 11b5831d72
commit e7900478eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,7 +228,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="24" :lg="12" v-if="hyperVMWShow && !deployasis"> <a-col :md="24" :lg="12" v-if="hyperVMWShow && !deployasis">
<a-form-item :label="$t('label.nicadaptertype')" name="nicadaptertype" ref="nicadaptertype"> <a-form-item ref="nicAdapterType" name="nicAdapterType" :label="$t('label.nicadaptertype')">
<a-select <a-select
v-model:value="form.nicAdapterType" v-model:value="form.nicAdapterType"
showSearch showSearch
@ -701,30 +701,30 @@ export default {
this.rootDisk.opts = controller this.rootDisk.opts = controller
}, },
fetchNicAdapterType () { fetchNicAdapterTypes () {
const nicAdapterType = [] const nicAdapterTypes = []
nicAdapterType.push({ nicAdapterTypes.push({
id: '', id: '',
description: '' description: ''
}) })
nicAdapterType.push({ nicAdapterTypes.push({
id: 'E1000', id: 'E1000',
description: 'E1000' description: 'E1000'
}) })
nicAdapterType.push({ nicAdapterTypes.push({
id: 'PCNet32', id: 'PCNet32',
description: 'PCNet32' description: 'PCNet32'
}) })
nicAdapterType.push({ nicAdapterTypes.push({
id: 'Vmxnet2', id: 'Vmxnet2',
description: 'Vmxnet2' description: 'Vmxnet2'
}) })
nicAdapterType.push({ nicAdapterTypes.push({
id: 'Vmxnet3', id: 'Vmxnet3',
description: 'Vmxnet3' description: 'Vmxnet3'
}) })
this.nicAdapterType.opts = nicAdapterType this.nicAdapterType.opts = nicAdapterTypes
}, },
fetchKeyboardType () { fetchKeyboardType () {
const keyboardType = [] const keyboardType = []
@ -882,7 +882,7 @@ export default {
this.resetSelect(arrSelectReset) this.resetSelect(arrSelectReset)
this.fetchFormat(hyperVisor) this.fetchFormat(hyperVisor)
this.fetchRootDisk(hyperVisor) this.fetchRootDisk(hyperVisor)
this.fetchNicAdapterType() this.fetchNicAdapterTypes()
this.fetchKeyboardType() this.fetchKeyboardType()
this.form.rootDiskControllerType = this.rootDisk.opts.length > 0 ? 'osdefault' : '' this.form.rootDiskControllerType = this.rootDisk.opts.length > 0 ? 'osdefault' : ''
@ -897,10 +897,10 @@ export default {
delete this.form.zoneids delete this.form.zoneids
} }
const formRaw = toRaw(this.form) const formRaw = toRaw(this.form)
const values = this.handleRemoveFields(formRaw) const formvalues = this.handleRemoveFields(formRaw)
let params = {} let params = {}
for (const key in values) { for (const key in formvalues) {
const input = values[key] const input = formvalues[key]
if (input === undefined) { if (input === undefined) {
continue continue