Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/API/UX/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Helpers.bytesToSize = function(bytes, precision) {
var terabyte = gigabyte * 1024

if ((bytes >= 0) && (bytes < kilobyte)) {
return bytes + 'b '
return bytes + 'B '
} else if ((bytes >= kilobyte) && (bytes < megabyte)) {
return (bytes / kilobyte).toFixed(precision) + 'kb '
return (bytes / kilobyte).toFixed(precision) + 'KiB '
} else if ((bytes >= megabyte) && (bytes < gigabyte)) {
return (bytes / megabyte).toFixed(precision) + 'mb '
return (bytes / megabyte).toFixed(precision) + 'MiB '
} else if ((bytes >= gigabyte) && (bytes < terabyte)) {
return (bytes / gigabyte).toFixed(precision) + 'gb '
return (bytes / gigabyte).toFixed(precision) + 'GiB '
} else if (bytes >= terabyte) {
return (bytes / terabyte).toFixed(precision) + 'tb '
return (bytes / terabyte).toFixed(precision) + 'TiB '
} else {
return bytes + 'b '
}
Expand Down
4 changes: 2 additions & 2 deletions lib/API/UX/pm2-ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,15 @@ function containersListing(sys_infos) {
var state = UxHelpers.colorStatus(c.state)

if (stacked_docker)
docker_table.push([id, c.image, state, `${cpu}%`, `${mem}mb`])
docker_table.push([id, c.image, state, `${cpu}%`, `${mem} MiB`])
else {
docker_table.push([
id,
c.image,
state,
c.restartCount,
`${cpu == 0 ? '0' : cpu}%`,
`${mem}mb`,
`${mem} MiB`,
`${c.stats.netIO.rx}/${isNaN(c.stats.netIO.tx) == true ? '0.0' : c.stats.netIO.tx}`,
`${c.stats.blockIO.r}/${c.stats.blockIO.w}`
])
Expand Down