add TB and EB to data volume function

This commit is contained in:
2020-07-19 11:40:11 +02:00
parent a6afb44223
commit 6367e15236

View File

@@ -73,7 +73,11 @@ function formatThousands(x) {
function formatDataVolume(amt, precision) {
if (precision < 3) { precision = 3; }
if (amt >= 1e12) {
if (amt >= 1e18) {
return (amt/1e18).toPrecision(precision) + " EB";
}else if (amt >= 1e15) {
return (amt/1e15).toPrecision(precision) + " PB";
}else if (amt >= 1e12) {
return (amt/1e12).toPrecision(precision) + " TB";
} else if (amt >= 1e9) {
return (amt/1e9).toPrecision(precision) + " GB";