Skip to content
Permalink
Browse files

Updated dashboard.js

Oversight.
  • Loading branch information...
BobbyWibowo committed Apr 12, 2019
1 parent 13081ef commit 9b1cb06825291ff4ecaecf972f3f5e4d10eec29c
Showing with 7 additions and 7 deletions.
  1. +6 −6 public/js/dashboard.js
  2. +1 −1 views/_globals.njk
@@ -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>
@@ -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" %}

0 comments on commit 9b1cb06

Please sign in to comment.
You can’t perform that action at this time.