Skip to content

Commit f563c16

Browse files
committed
Merge release branch 4.18 to main
* 4.18: UI: Infer template settings in the deploy VM wizard (#7867)
2 parents 24ae5aa + 57d4d0d commit f563c16

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

ui/src/views/compute/DeployVM.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,11 +1815,17 @@ export default {
18151815
if (template) {
18161816
var size = template.size / (1024 * 1024 * 1024) || 0 // bytes to GB
18171817
this.dataPreFill.minrootdisksize = Math.ceil(size)
1818-
this.defaultBootType = this.template?.details?.UEFI ? 'UEFI' : ''
1819-
this.fetchBootModes(this.defaultBootType)
1820-
this.defaultBootMode = this.template?.details?.UEFI
1821-
this.updateTemplateLinkedUserData(this.template.userdataid)
1822-
this.userdataDefaultOverridePolicy = this.template.userdatapolicy
1818+
this.updateTemplateLinkedUserData(template.userdataid)
1819+
this.userdataDefaultOverridePolicy = template.userdatapolicy
1820+
this.form.dynamicscalingenabled = template.isdynamicallyscalable
1821+
this.defaultBootType = template.details?.UEFI ? 'UEFI' : 'BIOS'
1822+
this.form.boottype = this.defaultBootType
1823+
this.fetchBootModes(this.form.boottype)
1824+
this.defaultBootMode = template.details?.UEFI || this.options.bootModes?.[0]?.id || undefined
1825+
this.form.bootmode = this.defaultBootMode
1826+
this.form.iothreadsenabled = template.details && Object.prototype.hasOwnProperty.call(template.details, 'iothreads')
1827+
this.form.iodriverpolicy = template.details?.['io.policy']
1828+
this.form.keyboard = template.details?.keyboard
18231829
}
18241830
} else if (name === 'isoid') {
18251831
this.templateConfigurations = []

0 commit comments

Comments
 (0)