From 9b1cb06825291ff4ecaecf972f3f5e4d10eec29c Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Fri, 12 Apr 2019 07:53:44 +0700 Subject: [PATCH] Updated dashboard.js Oversight. --- public/js/dashboard.js | 12 ++++++------ views/_globals.njk | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/js/dashboard.js b/public/js/dashboard.js index 37aa71d..8d2415a 100644 --- a/public/js/dashboard.js +++ b/public/js/dashboard.js @@ -1989,17 +1989,17 @@ page.getServerStats = function (element) { } let content = '' - for (const key of Object.keys(response.data.stats)) { let rows = '' for (const valKey of Object.keys(response.data.stats[key])) { - let value = response.data.stats[key][valKey] - if (['albums', 'users'].includes(key)) - value = value.toLocaleString() + const _value = response.data.stats[key][valKey] + let value = _value + if (['albums', 'users', 'uploads'].includes(key)) + value = _value.toLocaleString() if (['memoryUsage', 'size'].includes(valKey)) - value = page.getPrettyBytes(value) + value = page.getPrettyBytes(_value) if (valKey === 'systemMemory') - value = `${page.getPrettyBytes(value.used)} / ${page.getPrettyBytes(value.total)} (${Math.round(value.used / value.total * 100)}%)` + value = `${page.getPrettyBytes(_value.used)} / ${page.getPrettyBytes(_value.total)} (${Math.round(_value.used / _value.total * 100)}%)` rows += ` ${valKey.replace(/([A-Z])/g, ' $1').toUpperCase()} diff --git a/views/_globals.njk b/views/_globals.njk index 22c57e9..2bd81e1 100644 --- a/views/_globals.njk +++ b/views/_globals.njk @@ -16,7 +16,7 @@ v3: CSS and JS files (libs such as bulma, lazyload, etc). v4: Renders in /public/render/* directories (to be used by render.js). #} -{% set v1 = "MYXYdOtS8u" %} +{% set v1 = "ix1PYPhEvh" %} {% set v2 = "hiboQUzAzp" %} {% set v3 = "hiboQUzAzp" %} {% set v4 = "dplQUZqTnf" %}