mirror of https://github.com/apache/cloudstack.git
ui: fix NAN% used memory for vm (#11307)
This commit is contained in:
parent
524f0d80db
commit
d693736ee8
|
|
@ -54,8 +54,8 @@ export default {
|
||||||
const metricsFields = ['cpunumber', 'cputotal', 'cpuused', 'memorytotal',
|
const metricsFields = ['cpunumber', 'cputotal', 'cpuused', 'memorytotal',
|
||||||
{
|
{
|
||||||
memoryused: (record) => {
|
memoryused: (record) => {
|
||||||
if (record.memoryintfreekbs <= 0 || record.memorykbs <= 0) {
|
if (!record.memoryintfreekbs || record.memoryintfreekbs <= 0 || record.memorykbs <= 0) {
|
||||||
return '-'
|
return ''
|
||||||
}
|
}
|
||||||
return parseFloat(100.0 * (record.memorykbs - record.memoryintfreekbs) / record.memorykbs).toFixed(2) + '%'
|
return parseFloat(100.0 * (record.memorykbs - record.memoryintfreekbs) / record.memorykbs).toFixed(2) + '%'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue