🐛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"
|
title="Driver Version"
|
||||||
actions={
|
actions={
|
||||||
<span className="text-main-view-fg/80">
|
<span className="text-main-view-fg/80">
|
||||||
{gpu.additional_information?.driver_version}
|
{gpu.additional_information?.driver_version || '-'}
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -106,7 +106,7 @@ function SortableGPUItem({ gpu, index }: { gpu: GPU; index: number }) {
|
|||||||
title="Compute Capability"
|
title="Compute Capability"
|
||||||
actions={
|
actions={
|
||||||
<span className="text-main-view-fg/80">
|
<span className="text-main-view-fg/80">
|
||||||
{gpu.additional_information?.compute_cap}
|
{gpu.additional_information?.compute_cap || '-'}
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -157,7 +157,7 @@ function Hardware() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (pollingPaused) return;
|
if (pollingPaused) return
|
||||||
const intervalId = setInterval(() => {
|
const intervalId = setInterval(() => {
|
||||||
getHardwareInfo().then((data) => {
|
getHardwareInfo().then((data) => {
|
||||||
updateCPUUsage(data.cpu.usage)
|
updateCPUUsage(data.cpu.usage)
|
||||||
|
|||||||
@ -224,7 +224,7 @@ function SystemMonitor() {
|
|||||||
Driver Version:
|
Driver Version:
|
||||||
</span>
|
</span>
|
||||||
<span className="text-main-view-fg">
|
<span className="text-main-view-fg">
|
||||||
{gpu.additional_information.driver_version}
|
{gpu.additional_information?.driver_version || '-'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
@ -232,7 +232,7 @@ function SystemMonitor() {
|
|||||||
Compute Capability:
|
Compute Capability:
|
||||||
</span>
|
</span>
|
||||||
<span className="text-main-view-fg">
|
<span className="text-main-view-fg">
|
||||||
{gpu.additional_information.compute_cap}
|
{gpu.additional_information?.compute_cap || '-'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user