Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
});
}
// 主机/容器/实例: 内存使用率数据
if (monitorResult.counterResults['mem.memused.percent'] || monitorResult.counterResults['container.mem.usage.percent']) {
tableData = {
head: [],
item: [],
body: []
};
var usedPercetData, usedTotalData, usedData;
if (monitorResult.counterResults['mem.memused.percent']) {
usedPercetData = monitorResult.counterResults['mem.memused.percent'];
usedTotalData = monitorResult.counterResults['mem.memtotal'];
usedData = monitorResult.counterResults['mem.memused'];
} else {
usedPercetData = monitorResult.counterResults['container.mem.usage.percent'];
usedTotalData = monitorResult.counterResults['container.mem.limit'];
usedData = monitorResult.counterResults['container.mem.usage'];
}
if (singleItemName !== undefined) {
if (monitorResult.counterResults['mem.memused.percent']) {
tableData.head = [tableKeyName, '内存占用量(MB)', '内存总量(MB)', '内存占用率'];
} else {
tableData.head = [tableKeyName, '内存占用量(MB)', '内存限额(MB)', '内存占用率'];
}
tableData.item = ['key', 'memused', 'memtotal', 'mempercent'];
if (isShowCountTable) {
counterCountResults = {