You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2023/08/25 14:36:44 UTC
[cloudstack] branch 4.18 updated: UI: Infer template settings in the deploy VM wizard (#7867)
This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.18 by this push:
new 57d4d0d94a7 UI: Infer template settings in the deploy VM wizard (#7867)
57d4d0d94a7 is described below
commit 57d4d0d94a73da781b23ef332a0ad2056678db91
Author: Fabricio Duarte <fa...@gmail.com>
AuthorDate: Fri Aug 25 11:36:35 2023 -0300
UI: Infer template settings in the deploy VM wizard (#7867)
---
ui/src/views/compute/DeployVM.vue | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue
index f31c48ee8d4..5a962a37f36 100644
--- a/ui/src/views/compute/DeployVM.vue
+++ b/ui/src/views/compute/DeployVM.vue
@@ -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 = []