Show error if gpu stats could not be retrieved

This commit is contained in:
Nick Mowen 2022-11-15 08:56:47 -07:00
parent f172e3d851
commit 35947e2761

View File

@ -187,6 +187,12 @@ export default function System() {
<div key={gpu} className="dark:bg-gray-800 shadow-md hover:shadow-lg rounded-lg transition-shadow">
<div className="text-lg flex justify-between p-4">{gpu}</div>
<div className="p-2">
{gpu_usages[gpu]['gpu'] == -1 ? (
<div className="p-4">
There was an error getting usage stats. Either your GPU does not support this or frigate does
not have proper access.
</div>
) : (
<Table className="w-full">
<Thead>
<Tr>
@ -201,6 +207,7 @@ export default function System() {
</Tr>
</Tbody>
</Table>
)}
</div>
</div>
))}