Pearl1594 commented on code in PR #7867:
URL: https://github.com/apache/cloudstack/pull/7867#discussion_r1301742767
##########
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?.iothreads ?
template.details.iothreads === 'enabled' : null
Review Comment:
Can we simplify to?
```suggestion
this.form.iothreadsenabled = template?.details?.iothreads ===
'enabled' || null
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]