fix(dashboard): 修复资源趋势图取数变量未定义导致构建失败

e0cc547c 移除 generateMetricsData 时删掉了 `const data = ...`,
但 AreaChart 仍引用 `data`,触发 TS2304 "Cannot find name 'data'",
前端 tsc -b 无法通过。改为引用实际的 realData。

// Logan.Li
This commit is contained in:
Logan.Li committed 2026-09-14 07:33:28 +00:00
1 parent 6c82ca9031
commit 815c293b28
1 file changed
+1 -1
@@ -344,7 +344,7 @@ export function ResourceUsageCard({
{realData.length > 0 ? (
<div className="h-[280px]">
<ResponsiveContainer width="100%" height="100%">
<AreaChart data={data} margin={{ top: 10, right: 10, left: 0, bottom: 0 }}>
<AreaChart data={realData} margin={{ top: 10, right: 10, left: 0, bottom: 0 }}>
<defs>
<linearGradient id="colorCpu" x1="0" y1="0" x2="0" y2="1">
<stop offset="5%" stopColor="var(--dg-blue)" stopOpacity={0.3} />