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


##########
ui/src/views/compute/wizard/ComputeSelection.vue:
##########
@@ -226,10 +274,28 @@ export default {
       }
       if (this.preFillContent.memory) {
         this.memoryInputValue = this.preFillContent.memory
+        this.memoryDisplayValue = parseFloat((this.memoryInputValue / 
1024).toFixed(2))
       }
       this.updateComputeCpuNumber(this.preFillContent.cpunumber || 
this.cpuNumberInputValue)
       this.updateComputeCpuSpeed(this.preFillContent.cpuspeed || 
this.cpuSpeedInputValue)
-      this.updateComputeMemory(this.preFillContent.memory || 
this.memoryInputValue)
+      this.updateComputeMemory(this.memoryDisplayValue)

Review Comment:
   @saurabhkushwaha438 yes this is a better direction, 1500 stays 1500 now 
unless the user changes it. any reason for 0.25 GiB steps? you agreed with joao 
on steps of 1 for GiB and MiB.



##########
ui/src/views/compute/wizard/ComputeSelection.vue:
##########
@@ -241,12 +315,31 @@ 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) {
+        this.memoryDisplayValue = 0
+        displayValue = 0

Review Comment:
   @saurabhkushwaha438 can we keep the required error when the box is cleared? 
on an offering with no limits this now sends 0 instead.



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