mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-05 21:20:08 +00:00
fix: disable chart when offline
This commit is contained in:
@@ -76,6 +76,12 @@ export default function ServerDetailChart({
|
||||
return <ServerDetailChartLoading />;
|
||||
}
|
||||
|
||||
const { online } = formatNezhaInfo(nezhaWsData.now, server);
|
||||
|
||||
if (!online) {
|
||||
return <ServerDetailChartLoading />;
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="grid md:grid-cols-2 lg:grid-cols-3 grid-cols-1 gap-3">
|
||||
<CpuChart now={nezhaWsData.now} data={server} />
|
||||
|
||||
Reference in New Issue
Block a user