mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix: chart
This commit is contained in:
parent
93a90f4a33
commit
83122ad867
@ -103,6 +103,8 @@ function CpuChart({ history, data }: { history: ServerDataWithTimestamp[]; data:
|
||||
setCpuChartData(historyData)
|
||||
hasInitialized.current = true
|
||||
setHistoryLoaded(true)
|
||||
} else if (history.length === 0) {
|
||||
setHistoryLoaded(true)
|
||||
}
|
||||
}, [])
|
||||
|
||||
@ -224,6 +226,8 @@ function ProcessChart({
|
||||
setProcessChartData(historyData)
|
||||
hasInitialized.current = true
|
||||
setHistoryLoaded(true)
|
||||
} else if (history.length === 0) {
|
||||
setHistoryLoaded(true)
|
||||
}
|
||||
}, [])
|
||||
|
||||
@ -326,6 +330,8 @@ function MemChart({ data, history }: { data: NezhaAPISafe; history: ServerDataWi
|
||||
setMemChartData(historyData)
|
||||
hasInitialized.current = true
|
||||
setHistoryLoaded(true)
|
||||
} else if (history.length === 0) {
|
||||
setHistoryLoaded(true)
|
||||
}
|
||||
}, [])
|
||||
|
||||
@ -477,6 +483,8 @@ function DiskChart({ data, history }: { data: NezhaAPISafe; history: ServerDataW
|
||||
setDiskChartData(historyData)
|
||||
hasInitialized.current = true
|
||||
setHistoryLoaded(true)
|
||||
} else if (history.length === 0) {
|
||||
setHistoryLoaded(true)
|
||||
}
|
||||
}, [])
|
||||
|
||||
@ -604,6 +612,8 @@ function NetworkChart({
|
||||
setNetworkChartData(historyData)
|
||||
hasInitialized.current = true
|
||||
setHistoryLoaded(true)
|
||||
} else if (history.length === 0) {
|
||||
setHistoryLoaded(true)
|
||||
}
|
||||
}, [])
|
||||
|
||||
@ -750,6 +760,8 @@ function ConnectChart({
|
||||
setConnectChartData(historyData)
|
||||
hasInitialized.current = true
|
||||
setHistoryLoaded(true)
|
||||
} else if (history.length === 0) {
|
||||
setHistoryLoaded(true)
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
@ -68,13 +68,10 @@
|
||||
"@types/node": "^22.10.2",
|
||||
"@types/react": "^19.0.2",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-config-next": "^15.1.2",
|
||||
"eslint-plugin-turbo": "^2.3.3",
|
||||
"eslint-plugin-unused-imports": "^4.1.4",
|
||||
"postcss": "^8.4.49",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-tailwindcss": "^0.6.9",
|
||||
"tailwindcss": "^4.0.0-beta.8",
|
||||
"typescript": "^5.7.2",
|
||||
"vercel": "^39.2.2"
|
||||
|
Loading…
Reference in New Issue
Block a user