v0.171.0: disk-health card device-model label (pairs with agent v0.95.0)

agentapi.SmartSummary.ModelName mirrors the agent's model_name; the card row label
prefers the device model over the raw name/UUID, falling back to Name(+hint) on an
old agent. Additive. Test + red-proof (drop fallback -> A4 fails).
This commit is contained in:
2026-07-25 08:23:30 +02:00
parent de14eedb9f
commit f6a8249593
4 changed files with 42 additions and 3 deletions
+4 -3
View File
@@ -1012,9 +1012,10 @@ type ThinPoolFill struct {
// The SATA set (reallocated/pending/offline-uncorrectable) and the NVMe set
// (critical_warning/media_errors/percentage_used) are both carried; a device populates only its own.
type SmartSummary struct {
Health string `json:"health"` // PASSED | FAILING | UNKNOWN
TemperatureC *int `json:"temperature_c"`
PowerOnHours *int `json:"power_on_hours"`
Health string `json:"health"` // PASSED | FAILING | UNKNOWN
ModelName *string `json:"model_name,omitempty"` // smartctl device model (agent v0.95.0+); nil on older agents
TemperatureC *int `json:"temperature_c"`
PowerOnHours *int `json:"power_on_hours"`
// SATA attributes.
ReallocatedSectors *int `json:"reallocated_sectors"`
PendingSectors *int `json:"pending_sectors"`