aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-11-22 19:05:07 +0800
committerAaron LI <aaronly.me@outlook.com>2016-11-22 19:05:07 +0800
commit8be48b65ba7132b9e48ffd1be274eeb0ac195dc4 (patch)
tree01ff23c35f8141fffe6090d48eb2426a2ae90584 /fg21sim/webui
parent9795d02b8c7c7de3584069d611c4ff063324dc28 (diff)
downloadfg21sim-8be48b65ba7132b9e48ffd1be274eeb0ac195dc4.tar.bz2
webui: products.js: Convert file size from bytes to MB
Diffstat (limited to 'fg21sim/webui')
-rw-r--r--fg21sim/webui/static/js/products.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/fg21sim/webui/static/js/products.js b/fg21sim/webui/static/js/products.js
index dcd2aef..f2507bf 100644
--- a/fg21sim/webui/static/js/products.js
+++ b/fg21sim/webui/static/js/products.js
@@ -274,14 +274,15 @@ $(document).ready(function () {
title: ("Product: " + product.data("compID") + " @ " +
product.data("frequency") + " (#" + product.data("freqID") + ")"),
contents: [
- ("<strong>HEALPix map:</strong> " + product.data("path") + ", size: " +
- product.data("size") + " bytes, MD5: " + product.data("md5"))
+ ("<strong>HEALPix map:</strong> " + product.data("path") +
+ ", size: " + (product.data("size")/1024/1024).toFixed(1) +
+ " MB, MD5: " + product.data("md5"))
]
};
if (product.data("hpx-image")) {
var p = ("HPX image: " + product.data("hpx-path") + ", size: " +
- product.data("hpx-size") + "bytes, MD5: " +
- product.data("hpx-md5"));
+ (product.data("hpx-size")/1024/1024).toFixed(1) +
+ " MB, MD5: " + product.data("hpx-md5"));
modalData.contents.push(p);
}
showModalProducts(modalData);