[新增功能](el-admin v2.5): v2.5 beta 背景使用本地图片,服务监控优化

详情 https://www.ydyno.com/archives/1225.html
This commit is contained in:
ZhengJie
2020-05-07 22:43:43 +08:00
parent e729405834
commit 4ef60b1616
3 changed files with 9 additions and 3 deletions

View File

@@ -234,6 +234,12 @@ export default {
initData(this.url, {}).then(data => {
this.data = data
this.show = true
if (this.cpuInfo.xAxis.data.length >= 8) {
this.cpuInfo.xAxis.data.shift()
this.memoryInfo.xAxis.data.shift()
this.cpuInfo.series[0].data.shift()
this.memoryInfo.series[0].data.shift()
}
this.cpuInfo.xAxis.data.push(data.time)
this.memoryInfo.xAxis.data.push(data.time)
this.cpuInfo.series[0].data.push(parseFloat(data.memory.used))