> }
if (ataTable?.table) {
attrs = ataTable.table.map(a => ({
@@ -3386,9 +3389,17 @@ function HistoryTab({ disk }: { disk: DiskInfo }) {
smart_data: { device: disk.name, model: disk.model || '', serial: disk.serial || '', firmware: '', smart_status: 'passed', temperature: disk.temperature, power_on_hours: disk.power_on_hours || 0, attributes: attrs }
}
+ // Generate the report HTML using the same function as SMART tab
openSmartReport(disk, testStatus, attrs, [], entry.timestamp)
+
+ // Close the loading window — openSmartReport already opened the real one
+ if (reportWindow && !reportWindow.closed) {
+ reportWindow.close()
+ }
} catch {
- // Silently fail
+ if (reportWindow && !reportWindow.closed) {
+ reportWindow.document.body.innerHTML = 'Failed to load report data.
'
+ }
} finally {
setViewingReport(null)
}