From 8be48b65ba7132b9e48ffd1be274eeb0ac195dc4 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 22 Nov 2016 19:05:07 +0800 Subject: webui: products.js: Convert file size from bytes to MB --- fg21sim/webui/static/js/products.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'fg21sim/webui/static') 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: [ - ("HEALPix map: " + product.data("path") + ", size: " + - product.data("size") + " bytes, MD5: " + product.data("md5")) + ("HEALPix map: " + 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); -- cgit v1.2.2