Skip to content

Commit 57d4d0d

Browse files
authored
UI: Infer template settings in the deploy VM wizard (#7867)
1 parent 93bd5b7 commit 57d4d0d

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

ui/src/views/compute/DeployVM.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,11 +1789,17 @@ export default {
17891789
if (template) {
17901790
var size = template.size / (1024 * 1024 * 1024) || 0 // bytes to GB
17911791
this.dataPreFill.minrootdisksize = Math.ceil(size)
1792-
this.defaultBootType = this.template?.details?.UEFI ? 'UEFI' : ''
1793-
this.fetchBootModes(this.defaultBootType)
1794-
this.defaultBootMode = this.template?.details?.UEFI
1795-
this.updateTemplateLinkedUserData(this.template.userdataid)
1796-
this.userdataDefaultOverridePolicy = this.template.userdatapolicy
1792+
this.updateTemplateLinkedUserData(template.userdataid)
1793+
this.userdataDefaultOverridePolicy = template.userdatapolicy
1794+
this.form.dynamicscalingenabled = template.isdynamicallyscalable
1795+
this.defaultBootType = template.details?.UEFI ? 'UEFI' : 'BIOS'
1796+
this.form.boottype = this.defaultBootType
1797+
this.fetchBootModes(this.form.boottype)
1798+
this.defaultBootMode = template.details?.UEFI || this.options.bootModes?.[0]?.id || undefined
1799+
this.form.bootmode = this.defaultBootMode
1800+
this.form.iothreadsenabled = template.details && Object.prototype.hasOwnProperty.call(template.details, 'iothreads')
1801+
this.form.iodriverpolicy = template.details?.['io.policy']
1802+
this.form.keyboard = template.details?.keyboard
17971803
}
17981804
} else if (name === 'isoid') {
17991805
this.templateConfigurations = []

0 commit comments

Comments
 (0)