Skip to content

Commit d693736

Browse files
authored
ui: fix NAN% used memory for vm (#11307)
1 parent 524f0d8 commit d693736

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/src/config/section/compute.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export default {
5454
const metricsFields = ['cpunumber', 'cputotal', 'cpuused', 'memorytotal',
5555
{
5656
memoryused: (record) => {
57-
if (record.memoryintfreekbs <= 0 || record.memorykbs <= 0) {
58-
return '-'
57+
if (!record.memoryintfreekbs || record.memoryintfreekbs <= 0 || record.memorykbs <= 0) {
58+
return ''
5959
}
6060
return parseFloat(100.0 * (record.memorykbs - record.memoryintfreekbs) / record.memorykbs).toFixed(2) + '%'
6161
}

0 commit comments

Comments
 (0)