fix: update open playground btn

This commit is contained in:
jialin
2026-02-05 11:55:05 +08:00
parent 4e8b5e26ae
commit a1a7979fb3
18 changed files with 302 additions and 218 deletions
+21 -19
View File
@@ -102,7 +102,7 @@ const useGPUColumns = (props: {
sorter: tableSorter(6),
render: (text: number, record: GPUDeviceItem) => {
return (
<>
<span className="flex-center flex-full">
{record.core ? (
<ProgressBar
percent={_.round(record.core?.utilization_rate, 2)}
@@ -110,7 +110,7 @@ const useGPUColumns = (props: {
) : (
'-'
)}
</>
</span>
);
}
},
@@ -121,23 +121,25 @@ const useGPUColumns = (props: {
sorter: tableSorter(7),
render: (text: number, record: GPUDeviceItem, index: number) => {
return (
<ProgressBar
defaultOpen={index === 0 && loadend && firstLoad}
percent={
record.memory?.used
? _.round(record.memory?.utilization_rate, 0)
: _.round(
record.memory?.allocated / record.memory?.total,
0
) * 100
}
label={
<InfoColumn
fieldList={fieldList}
data={record.memory}
></InfoColumn>
}
></ProgressBar>
<span className="flex-center flex-full">
<ProgressBar
defaultOpen={index === 0 && loadend && firstLoad}
percent={
record.memory?.used
? _.round(record.memory?.utilization_rate, 0)
: _.round(
record.memory?.allocated / record.memory?.total,
0
) * 100
}
label={
<InfoColumn
fieldList={fieldList}
data={record.memory}
></InfoColumn>
}
></ProgressBar>
</span>
);
}
}