fix: audio set progress error

This commit is contained in:
jialin
2024-12-03 16:17:54 +08:00
parent 605d6f0f9b
commit 687dabc777
9 changed files with 52 additions and 55 deletions
+8 -3
View File
@@ -29,15 +29,20 @@ const GPUCard: React.FC<{
{intl.formatMessage({ id: 'resources.table.used' })}/
{intl.formatMessage({ id: 'resources.table.total' })}):{' '}
<span>
{convertFileSize(data?.memory?.used || 0)} /{' '}
{convertFileSize(data?.memory?.total || 0)}
{convertFileSize(
data?.memory?.used || data?.memory?.allocated || 0
)}{' '}
/ {convertFileSize(data?.memory?.total || 0)}
</span>
</span>
<span>
<span>
{intl.formatMessage({ id: 'resources.table.gpuutilization' })}:{' '}
</span>
{_.round(data?.memory?.utilization_rate || 0, 2)}%
{data?.memory?.used
? _.round(data?.memory?.utilization_rate || 0, 2)
: _.round(data.memory?.allocated / data.memory?.total, 2)}
%
</span>
</>
)}