ConvoyPanel / panel

A modern platform tailored for hosting providers and enthusiasts to effortlessly interact with their servers. Seamlessly wrapping around Proxmox, Convoy is easily deployable, affordable at just $6 per node per month for commercial use, and completely free for personal and non-profit endeavors.
https://convoypanel.com
Other
308 stars 51 forks source link

Use Mebibytes As Universal Base Storage Unit #71

Open ericwang401 opened 5 months ago

ericwang401 commented 5 months ago

Is there an existing feature request for this?

Describe the feature you would like to see.

Currently, Convoy stores storage units as mebibytes in the database (because of the max integer limit with MySQL's integer datatype) and converts it back to bytes when interacting with the value. This conversion can cause a little confusion and has a little bit of the mental overhead.

One such example is the frontend where users input mebibytes instead of bytes–inputting bytes is ridiculous given the large quantity of storage and memory nowadays. The developer has to remember to convert between the two values, and it's absolutely annoying and can lead to bugs.

Since absolutely no one uses bytes, mebibytes should be used throughout all the code.

Describe the solution you'd like.

Remove the byte to mebibyte and vice versa conversion.

Additional context to this request.

No response