suryag1201 commented on code in PR #14413:
URL: https://github.com/apache/cloudstack/pull/14413#discussion_r4453391986


##########
ui/src/views/compute/wizard/ComputeSelection.vue:
##########
@@ -241,18 +315,37 @@ export default {
     updateComputeCpuSpeed (value) {
       this.$emit('update-compute-cpuspeed', this.cpuSpeedInputDecorator, value)
     },
-    updateComputeMemory (value) {
-      if (!value) this.memoryInputValue = 0
-      if (!this.validateInput('memory', value)) {
+    updateComputeMemory (displayValue) {
+      if (displayValue === null || displayValue === undefined || displayValue 
=== '') {
+        this.memoryDisplayValue = 0
+        this.memoryInputValue = 0
+      } else {
+        this.memoryDisplayValue = displayValue
+      }
+      if (!this.validateInput('memory', displayValue)) {
         return
       }
-      this.$emit('update-compute-memory', this.memoryInputDecorator, value)
+      let memoryInMiB
+      if (this.memoryUnit === 'GiB') {
+        if (this.isConstrained && displayValue === this.minMemoryInUnit) {
+          memoryInMiB = this.minMemory
+        } else if (this.isConstrained && displayValue === 
this.maxMemoryInUnit) {
+          memoryInMiB = this.maxMemory
+        } else {
+          memoryInMiB = Math.round(displayValue * 1024)
+        }
+      } else {
+        memoryInMiB = Math.round(displayValue)

Review Comment:
   Could you please try this with custom unconstrained compute offering?



-- 
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]

Reply via email to