Commit 4cb96e90 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent c9e86666
......@@ -64,14 +64,14 @@ $(function () {
function get_octet_string_representation (size) {
var octets_link = new Array("bytes", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb"),
p = parseInt(Math.ceil(parseFloat(size.length)/parseFloat(3) - parseFloat(1))),
p = parseInt(Math.ceil(parseFloat(size.toString().length)/parseFloat(3) - parseFloat(1))),
pow_needed = p * 10;
pow_needed = Math.pow(2, pow_needed);
value = parseFloat($size)/parseFloat(pow_needed);
tmp = value.split(".");
value = tmp[0] + "." + tmp[1].slice(0, 2);
value = value + " " + octets_link[p];
return value;
pow_needed = Math.pow(2, pow_needed);
value = parseFloat(size)/parseFloat(pow_needed);
var tmp = value.toString().split(".");
value = tmp[0] + "." + tmp[1].slice(0, 2);
value = value + " " + octets_link[p];
return value;
}
// redraw chart
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment