Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/survey_server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2016-09-08 16:03:08 +0300
committerBjoern Schiessle <bjoern@schiessle.org>2016-09-08 16:03:08 +0300
commit1f3910a2ffd8797a2dad4ee9aeadc6048cc5afc6 (patch)
tree64c2032f8d1aa114d92db41752d250ac0622b152
parentd65492d5f914eb39ef132cf78df6c28f86d382f2 (diff)
show human readable file size
-rw-r--r--js/script.js12
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']);
+ }
};
/**