Fix storage stats

This commit is contained in:
Nick Mowen 2022-11-29 13:56:34 -07:00
parent 8a80116e8c
commit 8afe174e9f

View File

@ -15,7 +15,9 @@ export default function Storage() {
} = useWs('stats'); } = useWs('stats');
const { data: initialStats } = useSWR('stats'); const { data: initialStats } = useSWR('stats');
const { service = {} } = stats || initialStats || emptyObject; const { service } = stats || initialStats || emptyObject;
console.log("Service is " + service);
return ( return (
<div className="space-y-4 p-2 px-4"> <div className="space-y-4 p-2 px-4">
@ -36,13 +38,13 @@ export default function Storage() {
<Thead> <Thead>
<Tr> <Tr>
<Th>Location</Th> <Th>Location</Th>
<Th>Used</Th> <Th>Used MB</Th>
<Th>Total</Th> <Th>Total MB</Th>
</Tr> </Tr>
</Thead> </Thead>
<Tbody> <Tbody>
<Tr> <Tr>
<Td>Recordings</Td> <Td>Snapshots & Recordings</Td>
<Td>{service['storage']['/media/frigate/recordings']['used']}</Td> <Td>{service['storage']['/media/frigate/recordings']['used']}</Td>
<Td>{service['storage']['/media/frigate/recordings']['total']}</Td> <Td>{service['storage']['/media/frigate/recordings']['total']}</Td>
</Tr> </Tr>
@ -57,8 +59,8 @@ export default function Storage() {
<Thead> <Thead>
<Tr> <Tr>
<Th>Location</Th> <Th>Location</Th>
<Th>Used</Th> <Th>Used MB</Th>
<Th>Total</Th> <Th>Total MB</Th>
</Tr> </Tr>
</Thead> </Thead>
<Tbody> <Tbody>