UI: Infer template settings in the deploy VM wizard (#7867)

This commit is contained in:
Fabricio Duarte 2023-08-25 11:36:35 -03:00 committed by GitHub
parent 93bd5b7a69
commit 57d4d0d94a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 5 deletions

View File

@ -1789,11 +1789,17 @@ export default {
if (template) {
var size = template.size / (1024 * 1024 * 1024) || 0 // bytes to GB
this.dataPreFill.minrootdisksize = Math.ceil(size)
this.defaultBootType = this.template?.details?.UEFI ? 'UEFI' : ''
this.fetchBootModes(this.defaultBootType)
this.defaultBootMode = this.template?.details?.UEFI
this.updateTemplateLinkedUserData(this.template.userdataid)
this.userdataDefaultOverridePolicy = this.template.userdatapolicy
this.updateTemplateLinkedUserData(template.userdataid)
this.userdataDefaultOverridePolicy = template.userdatapolicy
this.form.dynamicscalingenabled = template.isdynamicallyscalable
this.defaultBootType = template.details?.UEFI ? 'UEFI' : 'BIOS'
this.form.boottype = this.defaultBootType
this.fetchBootModes(this.form.boottype)
this.defaultBootMode = template.details?.UEFI || this.options.bootModes?.[0]?.id || undefined
this.form.bootmode = this.defaultBootMode
this.form.iothreadsenabled = template.details && Object.prototype.hasOwnProperty.call(template.details, 'iothreads')
this.form.iodriverpolicy = template.details?.['io.policy']
this.form.keyboard = template.details?.keyboard
}
} else if (name === 'isoid') {
this.templateConfigurations = []