saurabhkushwaha438 commented on code in PR #14413:
URL: https://github.com/apache/cloudstack/pull/14413#discussion_r4468565672
##########
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:
> np. maybe, we can open it in MiB when the value isnt a whole number of
GiB? then 1500 stays 1500. on load and on a unit switch, send the saved MiB
value as is and only convert when the user changes the number.
Hey @nvazquez , @Damans227 @JoaoJandre maintainers after considering above
, i have work on these idea
-Default Unit: Defaults to MiB whenever memory limits or values are not
aligned with whole/quarter GiB (256 MiB).
-Unit Switch Guard: If a user attempts to switch from MiB to GiB with a
non-aligned value (e.g., 100 MiB), switching is prevented and a warning popup
is shown.
-GiB to MiB: Switching from GiB to MiB is always seamlessly allowed since
all GiB values (0.25 GiB increments) convert to exact integer MiB amounts (256
MiB multiples).
i have also tested other edge cases locally. for more clearity i have
attached video
https://github.com/user-attachments/assets/08f24732-f817-40f8-8753-7a6e66a80810
if you guys like this feature , then i can make another commit regarding
these feature
--
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]