From f3af1f7efada57dabb52f3454715eca79b442dfd Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Mon, 8 Sep 2025 21:45:33 +0000 Subject: [PATCH] refactor: redesign disk list as compact table to match Pulse's condensed data style --- .../src/components/Storage/DiskList.tsx | 189 +++++++++--------- 1 file changed, 96 insertions(+), 93 deletions(-) diff --git a/frontend-modern/src/components/Storage/DiskList.tsx b/frontend-modern/src/components/Storage/DiskList.tsx index e15361a7d..7cf4727d3 100644 --- a/frontend-modern/src/components/Storage/DiskList.tsx +++ b/frontend-modern/src/components/Storage/DiskList.tsx @@ -81,103 +81,106 @@ export const DiskList: Component = (props) => { }; return ( -
+
-
- No physical disks found - {props.selectedNode && ` for node ${props.selectedNode}`} - {props.searchTerm && ` matching "${props.searchTerm}"`} +
+
+ No physical disks found + {props.selectedNode && ` for node ${props.selectedNode}`} + {props.searchTerm && ` matching "${props.searchTerm}"`} +
- - {(disk) => { - const health = getHealthStatus(disk); - - return ( -
-
-
- {/* Header with model and health */} -
- - {health.text} - -

- {disk.model || 'Unknown Model'} -

- - {disk.type.toUpperCase()} - -
- - {/* Disk details */} -
-
- Node: - {disk.node} -
-
- Path: - {disk.devPath} -
-
- Size: - {formatBytes(disk.size)} -
-
- Usage: - {disk.used || 'Unknown'} -
-
- - {/* Additional metrics for SSDs */} - 0}> -
-
- SSD Life Remaining: -
-
-
= 50 ? 'bg-green-500' : - disk.wearout >= 20 ? 'bg-yellow-500' : - disk.wearout >= 10 ? 'bg-orange-500' : - 'bg-red-500' - }`} - style={`width: ${disk.wearout}%`} - /> -
-
- {disk.wearout}% -
-
- - - {/* Temperature if available */} - 0}> -
- Temperature: - 70 ? 'text-red-500' : - disk.temperature > 60 ? 'text-yellow-500' : - 'text-green-500' - }`}> - {disk.temperature}°C - -
-
- - {/* Serial number (smaller, muted) */} -
- Serial: {disk.serial} -
-
-
-
- ); - }} - + 0}> +
+
+ + + + + + + + + + + + + + + + {(disk) => { + const health = getHealthStatus(disk); + + return ( + + + + + + + + + + + ); + }} + + +
NodeDeviceModelTypeHealthSSD LifeSize
+ {disk.node} + + {disk.devPath} + + {disk.model || 'Unknown'} + + + {disk.type.toUpperCase()} + + + + {health.text} + + + 0} fallback={-}> +
+
+
= 50 ? 'bg-green-500' : + disk.wearout >= 20 ? 'bg-yellow-500' : + disk.wearout >= 10 ? 'bg-orange-500' : + 'bg-red-500' + }`} + style={`width: ${disk.wearout}%`} + /> +
+ + {disk.wearout}% + +
+ +
+ {formatBytes(disk.size)} +
+
+
+
); }; \ No newline at end of file