diff --git a/web/src/App.tsx b/web/src/App.tsx index 98385fc20..2f0853200 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -11,7 +11,6 @@ import { Suspense, lazy } from "react"; const Live = lazy(() => import("@/pages/Live")); const Events = lazy(() => import("@/pages/Events")); const Export = lazy(() => import("@/pages/Export")); -const Storage = lazy(() => import("@/pages/Storage")); const SubmitPlus = lazy(() => import("@/pages/SubmitPlus")); const ConfigEditor = lazy(() => import("@/pages/ConfigEditor")); const System = lazy(() => import("@/pages/System")); @@ -38,7 +37,6 @@ function App() { } /> } /> } /> - } /> } /> } /> } /> diff --git a/web/src/components/settings/GeneralSettings.tsx b/web/src/components/settings/GeneralSettings.tsx index e225257f3..fff82afe7 100644 --- a/web/src/components/settings/GeneralSettings.tsx +++ b/web/src/components/settings/GeneralSettings.tsx @@ -1,5 +1,4 @@ import { - LuActivity, LuGithub, LuHardDrive, LuLifeBuoy, @@ -150,18 +149,6 @@ export default function GeneralSettings({ className }: GeneralSettings) { Storage - - - - System metrics - - ("recordings/storage"); - - const { - value: { payload: stats }, - } = useWs("stats", ""); - const { data: initialStats } = useSWR("stats"); - - const { service } = stats || initialStats || emptyObject; - - const hasSeparateMedia = useMemo(() => { - return ( - service && - service["storage"]["/media/frigate/recordings"]["total"] != - service["storage"]["/media/frigate/clips"]["total"] - ); - }, [service]); - - const getUnitSize = (MB: number) => { - if (isNaN(MB) || MB < 0) return "Invalid number"; - if (MB < 1024) return `${MB} MiB`; - if (MB < 1048576) return `${(MB / 1024).toFixed(2)} GiB`; - - return `${(MB / 1048576).toFixed(2)} TiB`; - }; - - if (!service || !storage) { - return ; - } - - return ( - <> - Storage - - - Overview - -
- - -
- Data - - - - - - -

- Overview of total used storage and total capacity of the - drives that hold the recordings and snapshots directories. -

-
-
-
-
-
- - - - - Location - Used - Total - - - - - - {hasSeparateMedia ? "Recordings" : "Recordings & Snapshots"} - - - {getUnitSize( - service["storage"]["/media/frigate/recordings"]["used"], - )} - - - {getUnitSize( - service["storage"]["/media/frigate/recordings"]["total"], - )} - - - {hasSeparateMedia && ( - - Snapshots - - {getUnitSize( - service["storage"]["/media/frigate/clips"]["used"], - )} - - - {getUnitSize( - service["storage"]["/media/frigate/clips"]["total"], - )} - - - )} - -
-
-
- - - -
- Memory - - - - - - -

Overview of used and total memory in frigate process.

-
-
-
-
-
- - - - - Location - Used - Total - - - - - /dev/shm - - {getUnitSize(service["storage"]["/dev/shm"]["used"])} - - - {getUnitSize(service["storage"]["/dev/shm"]["total"])} - - - - /tmp/cache - - {getUnitSize(service["storage"]["/tmp/cache"]["used"])} - - - {getUnitSize(service["storage"]["/tmp/cache"]["total"])} - - - -
-
-
-
- -
- Cameras - - - - - - -

Overview of per-camera storage usage and bandwidth.

-
-
-
-
- -
- {Object.entries(storage).map(([name, camera]) => ( - - -
- - - - Usage - Stream Bandwidth - - - - - - {Math.round(camera["usage_percent"] ?? 0)}% - - - {camera["bandwidth"] - ? `${getUnitSize(camera["bandwidth"])}/hr` - : "Calculating..."} - - - -
-
-
- ))} -
- - ); -} - -export default Storage;