You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "DaanHoogland (via GitHub)" <gi...@apache.org> on 2023/04/17 14:39:10 UTC
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #7423: ui: fix custom offering cpuspeed during vm import
DaanHoogland commented on code in PR #7423:
URL: https://github.com/apache/cloudstack/pull/7423#discussion_r1168819809
##########
ui/src/views/tools/ImportUnmanagedInstance.vue:
##########
@@ -522,6 +523,9 @@ export default {
}
return 'serviceofferingdetails' in this.computeOffering ? this.computeOffering.serviceofferingdetails.maxmemory * 1 : Number.MAX_SAFE_INTEGER
},
+ getCPUSpeed () {
+ return (this.computeOffering.iscustomized ? this.resource.cpuspeed : 0) || this.computeOffering?.cpuspeed * 1 || 0
Review Comment:
should it be
```suggestion
return (this.computeOffering?.iscustomized ? this.resource.cpuspeed : 0) || this.computeOffering?.cpuspeed * 1 || 0
```
?
It seems we don“t trust the presence of `this.computeOffering` in the later part but rely on it in hte first part of the expression.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org