fix: 回到0d79acc HiChart版本 + 清缓存
This commit is contained in:
@@ -321,8 +321,7 @@
|
||||
}
|
||||
grid.appendChild(card);
|
||||
_cardCache[id] = card;
|
||||
if (isRow) {
|
||||
if (_chartInstances[id]) { _chartInstances[id] = null; }
|
||||
if (isRow && !_chartInstances[id]) {
|
||||
try {
|
||||
_chartInstances[id] = { cpu: null, mem: null, net: null };
|
||||
if (typeof MiniChart !== 'undefined') {
|
||||
@@ -332,6 +331,7 @@
|
||||
_chartInstances[id].net = new DualLineChart(id+'-net', '#bb9af7', '#c0a8f0');
|
||||
|
||||
}
|
||||
} catch(e) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,6 +374,7 @@
|
||||
if (charts.cpu) charts.cpu.update(cpuVal);
|
||||
if (charts.mem) charts.mem.update(memVal);
|
||||
if (charts.net) { charts.net.update(net.rx_bytes_sec||0, net.tx_bytes_sec||0); if (charts.net.maxVal < 102400) charts.net.maxVal = 102400; }
|
||||
} catch(e) {}
|
||||
}
|
||||
// 更新额外指标
|
||||
var loadEl = card.querySelector('.load-val');
|
||||
|
||||
Reference in New Issue
Block a user