From: Eric Bollengier Date: Tue, 16 Dec 2008 21:53:52 +0000 (+0000) Subject: ebl Allow usage of string and int for human_xxx functions X-Git-Tag: Release-3.0.0~468 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=395d7f3b72353d5f98b4970609bf695fc436d23f;p=bacula%2Fbacula ebl Allow usage of string and int for human_xxx functions git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8175 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/html/bweb.js b/gui/bweb/html/bweb.js index 43803a9c44..d59f0ef367 100644 --- a/gui/bweb/html/bweb.js +++ b/gui/bweb/html/bweb.js @@ -94,6 +94,7 @@ function human_size(val) if (!val) { return ''; } + val = parseInt(val); var unit = ['B', 'KB', 'MB', 'GB', 'TB']; var i=0; var format; @@ -127,6 +128,7 @@ function human_sec(val) if (!val) { val = 0; } + val = parseInt(val); val /= 60; // sec -> min if ((val / 60) <= 1) {