1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

fix: 修复概览页数据加载失败的问题 (#1178)

This commit is contained in:
ssongliu 2023-05-29 15:10:40 +08:00 committed by GitHub
parent 9f5a03419e
commit 7c0327c1b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,6 @@ const onLoadBaseInfo = async (isInit: boolean, range: string) => {
statuRef.value.acceptParams(currentInfo.value, baseInfo.value);
appRef.value.acceptParams();
if (isInit) {
// window.addEventListener('resize', changeChartSize);
timer = setInterval(async () => {
onLoadCurrentInfo();
}, 3000);

View File

@ -207,6 +207,7 @@ const acceptParams = (current: Dashboard.CurrentInfo, base: Dashboard.BaseInfo):
freshChart('cpu', 'CPU', formatNumber(currentInfo.value.cpuUsedPercent));
freshChart('memory', i18n.global.t('monitor.memory'), formatNumber(currentInfo.value.MemoryUsedPercent));
freshChart('load', i18n.global.t('home.load'), formatNumber(currentInfo.value.loadUsagePercent));
currentInfo.value.diskData = currentInfo.value.diskData || [];
nextTick(() => {
for (let i = 0; i < currentInfo.value.diskData.length; i++) {
let itemPath = currentInfo.value.diskData[i].path;