diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-09-08 16:03:08 +0300 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-09-08 16:03:08 +0300 |
commit | 1f3910a2ffd8797a2dad4ee9aeadc6048cc5afc6 (patch) | |
tree | 64c2032f8d1aa114d92db41752d250ac0622b152 | |
parent | d65492d5f914eb39ef132cf78df6c28f86d382f2 (diff) |
show human readable file size
-rw-r--r-- | js/script.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/js/script.js b/js/script.js index 02f6e04..026cc8f 100644 --- a/js/script.js +++ b/js/script.js @@ -57,9 +57,15 @@ * @param users statistics about the users */ var ocNumericStatistics = function(id, data) { - $('#' + id + 'Max span').text(data['max']); - $('#' + id + 'Min span').text(data['min']); - $('#' + id + 'Average span').text(data['average']); + if (id.substring(0, 3) == 'php' || id.substring(0, 8) == 'database') { + $('#' + id + 'Max span').text(OC.Util.humanFileSize(data['max'])); + $('#' + id + 'Min span').text(OC.Util.humanFileSize(data['min'])); + $('#' + id + 'Average span').text(OC.Util.humanFileSize(data['average'])); + } else { + $('#' + id + 'Max span').text(data['max']); + $('#' + id + 'Min span').text(data['min']); + $('#' + id + 'Average span').text(data['average']); + } }; /** |