Refactored "hhmmss" -> "uptime"

This commit is contained in:
Bobby Wibowo 2020-08-22 01:39:04 +07:00
parent 6fb234984a
commit 0b27babb31
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
2 changed files with 2 additions and 2 deletions

View File

@ -618,7 +618,7 @@ self.stats = async (req, res, next) => {
_types: {
byte: ['memoryUsage'],
byteUsage: ['systemMemory'],
hhmmss: ['systemUptime', 'nodeUptime']
uptime: ['systemUptime', 'nodeUptime']
},
platform: `${os.platform} ${os.arch}`,
distro: `${os.distro} ${os.release}`,

View File

@ -2861,7 +2861,7 @@ page.getStatistics = (params = {}) => {
parsed = page.getPrettyBytes(value)
if ((types.byteUsage || []).includes(valKeys[j]))
parsed = `${page.getPrettyBytes(value.used)} / ${page.getPrettyBytes(value.total)} (${Math.round(value.used / value.total * 100)}%)`
if ((types.hhmmss || []).includes(valKeys[j]))
if ((types.uptime || []).includes(valKeys[j]))
parsed = page.getPrettyUptime(value)
const string = valKeys[j]