mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-19 03:56:18 +00:00
Update storage-overview.tsx
This commit is contained in:
@@ -9,7 +9,8 @@ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } f
|
|||||||
|
|
||||||
interface DiskInfo {
|
interface DiskInfo {
|
||||||
name: string
|
name: string
|
||||||
size?: string
|
size?: number // Changed from string to number (KB) for formatMemory()
|
||||||
|
size_formatted?: string // Added formatted size string for display
|
||||||
temperature: number
|
temperature: number
|
||||||
health: string
|
health: string
|
||||||
power_on_hours?: number
|
power_on_hours?: number
|
||||||
@@ -25,8 +26,8 @@ interface DiskInfo {
|
|||||||
reallocated_sectors?: number
|
reallocated_sectors?: number
|
||||||
pending_sectors?: number
|
pending_sectors?: number
|
||||||
crc_errors?: number
|
crc_errors?: number
|
||||||
rotation_rate?: number // Added rotation rate (RPM)
|
rotation_rate?: number
|
||||||
power_cycles?: number // Added power cycle count
|
power_cycles?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ZFSPool {
|
interface ZFSPool {
|
||||||
@@ -458,10 +459,10 @@ export function StorageOverview() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 text-sm">
|
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 text-sm">
|
||||||
{disk.size && (
|
{disk.size_formatted && (
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm text-muted-foreground">Size</p>
|
<p className="text-sm text-muted-foreground">Size</p>
|
||||||
<p className="font-medium">{disk.size}</p>
|
<p className="font-medium">{disk.size_formatted}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{disk.smart_status && disk.smart_status !== "unknown" && (
|
{disk.smart_status && disk.smart_status !== "unknown" && (
|
||||||
@@ -512,7 +513,7 @@ export function StorageOverview() {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm text-muted-foreground">Capacity</p>
|
<p className="text-sm text-muted-foreground">Capacity</p>
|
||||||
<p className="font-medium">{selectedDisk.size}</p>
|
<p className="font-medium">{selectedDisk.size_formatted}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm text-muted-foreground">Health Status</p>
|
<p className="text-sm text-muted-foreground">Health Status</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user