Updated dashboard.js

Oversight.
This commit is contained in:
Bobby Wibowo 2019-04-12 07:53:44 +07:00
parent 13081ef38a
commit 9b1cb06825
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
2 changed files with 7 additions and 7 deletions

View File

@ -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 += `
<tr>
<th>${valKey.replace(/([A-Z])/g, ' $1').toUpperCase()}</th>

View File

@ -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" %}