🐛fix: prevent render error when additional information missing from hardware (#5413)
This commit is contained in:
parent
329fb7d023
commit
8fdb65eba5
@ -98,7 +98,7 @@ function SortableGPUItem({ gpu, index }: { gpu: GPU; index: number }) {
|
||||
title="Driver Version"
|
||||
actions={
|
||||
<span className="text-main-view-fg/80">
|
||||
{gpu.additional_information?.driver_version}
|
||||
{gpu.additional_information?.driver_version || '-'}
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
@ -106,7 +106,7 @@ function SortableGPUItem({ gpu, index }: { gpu: GPU; index: number }) {
|
||||
title="Compute Capability"
|
||||
actions={
|
||||
<span className="text-main-view-fg/80">
|
||||
{gpu.additional_information?.compute_cap}
|
||||
{gpu.additional_information?.compute_cap || '-'}
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
@ -157,7 +157,7 @@ function Hardware() {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (pollingPaused) return;
|
||||
if (pollingPaused) return
|
||||
const intervalId = setInterval(() => {
|
||||
getHardwareInfo().then((data) => {
|
||||
updateCPUUsage(data.cpu.usage)
|
||||
|
||||
@ -224,7 +224,7 @@ function SystemMonitor() {
|
||||
Driver Version:
|
||||
</span>
|
||||
<span className="text-main-view-fg">
|
||||
{gpu.additional_information.driver_version}
|
||||
{gpu.additional_information?.driver_version || '-'}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex justify-between items-center">
|
||||
@ -232,7 +232,7 @@ function SystemMonitor() {
|
||||
Compute Capability:
|
||||
</span>
|
||||
<span className="text-main-view-fg">
|
||||
{gpu.additional_information.compute_cap}
|
||||
{gpu.additional_information?.compute_cap || '-'}
|
||||
</span>
|
||||
</div>
|
||||
<div className="mt-2">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user