Merge pull request #68 from zmf963/main

修复GPU监控显示问题
This commit is contained in:
dushixiang authored and GitHub committed 2026-01-30 15:14:21 +08:00
commit fa70172e5c
2 files changed
+3 -3

No files matched your search

@@ -37,7 +37,7 @@ export const GpuMonitorSection = ({latestMetrics}: GpuMonitorSectionProps) => {
</div>
</div>
<span className="text-2xl font-bold text-purple-400">
{gpu.utilization?.toFixed(1)}%
{gpu.utilization?.toFixed(1) ?? 0}%
</span>
</div>
<div className="space-y-2 text-xs">
@@ -53,7 +53,7 @@ export const GpuMonitorSection = ({latestMetrics}: GpuMonitorSectionProps) => {
</div>
<div className="flex items-center justify-between">
<span className="text-cyan-500 font-mono text-xs uppercase tracking-wider">功耗</span>
<span className="font-medium text-cyan-200">{gpu.powerDraw?.toFixed(1)}W</span>
<span className="font-medium text-cyan-200">{gpu.powerUsage?.toFixed(1)}W</span>
</div>
<div className="flex items-center justify-between">
<span className="text-cyan-500 font-mono text-xs uppercase tracking-wider">风扇转速</span>
+1 -1
View File
@@ -245,7 +245,7 @@ export interface GPUMetric {
memoryUsed: number;
memoryFree: number;
temperature: number;
powerDraw: number;
powerUsage: number;
fanSpeed: number;
performanceState: string;
timestamp: number;