From 90003162249bc5f2f81eb0ca21bfb613e4bb3592 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Mon, 13 Apr 2026 08:38:32 +0200 Subject: [PATCH] Update storage-overview.tsx --- AppImage/components/storage-overview.tsx | 116 +++++++---------------- 1 file changed, 36 insertions(+), 80 deletions(-) diff --git a/AppImage/components/storage-overview.tsx b/AppImage/components/storage-overview.tsx index 9ac3bda7..b397cd67 100644 --- a/AppImage/components/storage-overview.tsx +++ b/AppImage/components/storage-overview.tsx @@ -1719,10 +1719,11 @@ function openSmartReport(disk: DiskInfo, testStatus: SmartTestStatus, smartAttri ` }) - observationsHtml = ` - -
-
6. Observations & Events (${observations.length} recorded, ${totalOccurrences} total occurrences)
+ const obsSecNum = isNvmeDisk ? '6' : '5' + observationsHtml = ` + +
+
${obsSecNum}. Observations & Events (${observations.length} recorded, ${totalOccurrences} total occurrences)

The following events have been detected and logged for this disk. These observations may indicate potential issues that require attention.

${groupsHtml}
@@ -1887,9 +1888,12 @@ function openSmartReport(disk: DiskInfo, testStatus: SmartTestStatus, smartAttri
1. Executive Summary
-
-
${isHealthy ? '✓' : '✗'}
-
${healthLabel}
+
+
+
${isHealthy ? '✓' : '✗'}
+
${healthLabel}
+
+
SMART Status

Disk Health Assessment

@@ -1921,7 +1925,7 @@ function openSmartReport(disk: DiskInfo, testStatus: SmartTestStatus, smartAttri
Type
-
${diskType}
+
${diskType === 'HDD' && disk.rotation_rate ? `HDD ${disk.rotation_rate} RPM` : diskType}
@@ -1933,6 +1937,7 @@ function openSmartReport(disk: DiskInfo, testStatus: SmartTestStatus, smartAttri
${powerOnHours.toLocaleString()}h
Power On Time
+
${powerOnYears}y ${powerOnDays}d
${(disk.power_cycles ?? 0).toLocaleString()}
@@ -1948,74 +1953,25 @@ function openSmartReport(disk: DiskInfo, testStatus: SmartTestStatus, smartAttri `}
-
- -${!isNvmeDisk ? ` - -
-
3. Disk Overview
-
- -
-
-
-
Temperature
-
${disk.temperature > 0 ? disk.temperature + '°C' : 'N/A'}
-
Optimal: ${tempThresholds.optimal}
-
-
-
Power On Hours
-
${powerOnHours.toLocaleString()}h
-
${powerOnYears}y ${powerOnDays}d
-
-
-
Rotation Rate
-
${diskType === 'HDD' ? (disk.rotation_rate ? disk.rotation_rate + ' RPM' : 'N/A') : 'SSD'}
-
-
-
Power Cycles
-
${(disk.power_cycles ?? 0).toLocaleString()}
-
-
+ ${!isNvmeDisk ? ` +
+
+
${disk.pending_sectors ?? 0}
+
Pending Sectors
- - -
-
HEALTH INDICATORS
-
-
-
-
-
SMART Status
-
${disk.smart_status || 'N/A'}
-
-
-
-
-
-
Reallocated Sectors
-
${disk.reallocated_sectors ?? 0}
-
-
-
-
-
-
Pending Sectors
-
${disk.pending_sectors ?? 0}
-
-
-
-
-
-
CRC Errors
-
${disk.crc_errors ?? 0}
-
-
-
+
+
${disk.crc_errors ?? 0}
+
CRC Errors
+
+
+
${disk.smart_status || 'N/A'}
+
SMART Status
+ ` : ''}
-` : ''} + + ${isNvmeDisk ? ` @@ -2079,7 +2035,7 @@ ${isNvmeDisk ? `
-
4. ${isNvmeDisk ? 'NVMe Health Metrics' : 'SMART Attributes'} (${smartAttributes.length} total${hasCritical ? `, ${criticalAttrs.length} warning(s)` : ''})
+
${isNvmeDisk ? '4' : '3'}. ${isNvmeDisk ? 'NVMe Health Metrics' : 'SMART Attributes'} (${smartAttributes.length} total${hasCritical ? `, ${criticalAttrs.length} warning(s)` : ''})
@@ -2100,7 +2056,7 @@ ${isNvmeDisk ? `
-
5. Last Self-Test Result
+
${isNvmeDisk ? '5' : '4'}. Last Self-Test Result
${testStatus.last_test ? `
@@ -2115,10 +2071,10 @@ ${isNvmeDisk ? `
Completed
${testStatus.last_test.timestamp || 'N/A'}
-
-
Duration
-
${testStatus.last_test.duration || 'N/A'}
-
+
+
At Power-On Hours
+
${testStatus.last_test.lifetime_hours ? testStatus.last_test.lifetime_hours.toLocaleString() + 'h' : 'N/A'}
+
` : `
@@ -2129,9 +2085,9 @@ ${isNvmeDisk ? ` ${observationsHtml} - +
-
${observations.length > 0 ? '7' : '6'}. Recommendations
+
${observations.length > 0 ? (isNvmeDisk ? '7' : '6') : (isNvmeDisk ? '6' : '5')}. Recommendations
${recommendations.join('')}