diff --git a/web/src/routes/Storage.jsx b/web/src/routes/Storage.jsx
index ff2602f7d..6dfc9165a 100644
--- a/web/src/routes/Storage.jsx
+++ b/web/src/routes/Storage.jsx
@@ -18,95 +18,118 @@ export default function Storage() {
const { service } = stats || initialStats || emptyObject;
+ if (!service || !storage) {
+ return ;
+ }
+
+ let storage_usage;
+ if (
+ service &&
+ service['storage']['/media/frigate/recordings']['total'] != service['storage']['/media/frigate/clips']['total']
+ ) {
+ storage_usage = (
+
+
+ Recordings |
+ {service['storage']['/media/frigate/recordings']['used']} |
+ {service['storage']['/media/frigate/recordings']['total']} |
+
+
+ Snapshots |
+ {service['storage']['/media/frigate/clips']['used']} |
+ {service['storage']['/media/frigate/clips']['total']} |
+
+
+ );
+ } else {
+ storage_usage = (
+
+
+ Recordings & Snapshots |
+ {service['storage']['/media/frigate/recordings']['used']} |
+ {service['storage']['/media/frigate/recordings']['total']} |
+
+
+ );
+ }
+
return (
Storage
- {(!service || !storage) ? (
-
-
+
+ Overview
+
+
+
Data
+
+
+
+
+ Location |
+ Used MB |
+ Total MB |
+
+
+ {storage_usage}
+
+
+
+
+
Memory
+
+
+
+
+ Location |
+ Used MB |
+ Total MB |
+
+
+
+
+ /dev/shm |
+ {service['storage']['/dev/shm']['used']} |
+ {service['storage']['/dev/shm']['total']} |
+
+
+ /tmp/cache |
+ {service['storage']['/tmp/cache']['used']} |
+ {service['storage']['/tmp/cache']['total']} |
+
+
+
+
+
- ) : (
-
- Overview
-
-
-
Data
-
-
-
-
- Location |
- Used MB |
- Total MB |
-
-
-
-
- Snapshots & Recordings |
- {service['storage']['/media/frigate/recordings']['used']} |
- {service['storage']['/media/frigate/recordings']['total']} |
-
-
-
-
-
-
-
Memory
-
-
-
-
- Location |
- Used MB |
- Total MB |
-
-
-
-
- /dev/shm |
- {service['storage']['/dev/shm']['used']} |
- {service['storage']['/dev/shm']['total']} |
-
-
- /tmp/cache |
- {service['storage']['/tmp/cache']['used']} |
- {service['storage']['/tmp/cache']['total']} |
-
-
-
-
-
-
- Cameras
-
- {Object.entries(storage).map(([name, camera]) => (
-
-
- {name.replaceAll('_', ' ')}
-
-
-
-
-
- Usage |
- Stream Bandwidth |
-
-
-
-
- {Math.round(camera['usage_percent'] ?? 0)}% |
- {camera['bandwidth'] ? camera['bandwidth'] : "Calculating..."} MB/hr |
-
-
-
-
+
Cameras
+
+ {Object.entries(storage).map(([name, camera]) => (
+
+
+ {name.replaceAll('_', ' ')}
- ))}
-
-
- )}
+
+
+
+
+ Usage |
+ Stream Bandwidth |
+
+
+
+
+ {Math.round(camera['usage_percent'] ?? 0)}% |
+ {camera['bandwidth'] ? camera['bandwidth'] : 'Calculating...'} MB/hr |
+
+
+
+
+
+ ))}
+
+
);
}