fix npu graph

This commit is contained in:
Josh Hawkins 2025-11-20 17:26:53 -06:00
parent 8de0b84227
commit e20b788966

View File

@ -729,29 +729,30 @@ export default function GeneralMetrics({
) : ( ) : (
<Skeleton className="aspect-video w-full" /> <Skeleton className="aspect-video w-full" />
)} )}
</>
)} {statsHistory[0]?.npu_usages && (
{statsHistory[0]?.npu_usages && ( <>
<> {statsHistory.length != 0 ? (
{statsHistory.length != 0 ? ( <div className="rounded-lg bg-background_alt p-2.5 md:rounded-2xl">
<div className="rounded-lg bg-background_alt p-2.5 md:rounded-2xl"> <div className="mb-5">
<div className="mb-5"> {t("general.hardwareInfo.npuUsage")}
{t("general.hardwareInfo.npuUsage")} </div>
</div> {npuSeries.map((series) => (
{npuSeries.map((series) => ( <ThresholdBarGraph
<ThresholdBarGraph key={series.name}
key={series.name} graphId={`${series.name}-npu`}
graphId={`${series.name}-npu`} name={series.name}
name={series.name} unit="%"
unit="%" threshold={GPUUsageThreshold}
threshold={GPUUsageThreshold} updateTimes={updateTimes}
updateTimes={updateTimes} data={[series]}
data={[series]} />
/> ))}
))} </div>
</div> ) : (
) : ( <Skeleton className="aspect-video w-full" />
<Skeleton className="aspect-video w-full" /> )}
</>
)} )}
</> </>
)} )}