diff --git a/web/src/routes/Storage.jsx b/web/src/routes/Storage.jsx
index b32071205..ac21b0bb4 100644
--- a/web/src/routes/Storage.jsx
+++ b/web/src/routes/Storage.jsx
@@ -18,6 +18,10 @@ export default function Storage() {
const { service } = stats || initialStats || emptyObject;
+ if (!service || !storage) {
+ return ;
+ }
+
let storage_usage;
if (
service &&
@@ -53,85 +57,79 @@ export default function Storage() {
Storage
- {!service || !storage ? (
-
- ) : (
-
- Overview
-
-
-
Data
-
-
-
-
- | Location |
- Used MB |
- Total MB |
-
-
- {storage_usage}
-
-
+
+ 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']} |
+
+
+
+
+
+
+
+
Cameras
+
+ {Object.entries(storage).map(([name, camera]) => (
+
+
+ {name.replaceAll('_', ' ')}
+
- | Location |
- Used MB |
- Total MB |
+ Usage |
+ Stream Bandwidth |
- | /dev/shm |
- {service['storage']['/dev/shm']['used']} |
- {service['storage']['/dev/shm']['total']} |
-
-
- | /tmp/cache |
- {service['storage']['/tmp/cache']['used']} |
- {service['storage']['/tmp/cache']['total']} |
+ {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 |
-
-
-
-
-
- ))}
-
-
- )}
+ ))}
+
+
);
}