From 7da44115d34d2827cab3c6f6b0cfab383d23677b Mon Sep 17 00:00:00 2001
From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Date: Sat, 28 Sep 2024 08:24:14 -0500
Subject: [PATCH] Clarify storage metrics values with a popover (#14034)
---
 .../components/graph/CombinedStorageGraph.tsx | 33 +++++++++++++++++--
 web/src/views/system/StorageMetrics.tsx       | 30 ++++++++++++++++-
 2 files changed, 60 insertions(+), 3 deletions(-)
diff --git a/web/src/components/graph/CombinedStorageGraph.tsx b/web/src/components/graph/CombinedStorageGraph.tsx
index 1a72f8c88..ff605ac02 100644
--- a/web/src/components/graph/CombinedStorageGraph.tsx
+++ b/web/src/components/graph/CombinedStorageGraph.tsx
@@ -10,7 +10,13 @@ import {
   TableHeader,
   TableRow,
 } from "@/components/ui/table";
+import {
+  Popover,
+  PopoverContent,
+  PopoverTrigger,
+} from "@/components/ui/popover";
 import { getUnitSize } from "@/utils/storageUtil";
+import { LuAlertCircle } from "react-icons/lu";
 
 type CameraStorage = {
   [key: string]: {
@@ -50,7 +56,7 @@ export function CombinedStorageGraph({
 
   // Add the unused percentage to the series
   series.push({
-    name: "Unused Free Space",
+    name: "Unused",
     data: [
       ((totalStorage.total - totalStorage.used) / totalStorage.total) * 100,
     ],
@@ -186,11 +192,34 @@ export function CombinedStorageGraph({
                     style={{ backgroundColor: item.color }}
                   >
                   {item.name.replaceAll("_", " ")}
+                  {item.name === "Unused" && (
+