JSON Basic Parser: Make sure the health property is in the health section (fixes GUI not displaying health after first scan).

This commit is contained in:
Alexander Shaduri
2024-10-31 15:21:02 +04:00
parent f4e22a5c96
commit 1d0e325813
+5 -1
View File
@@ -216,7 +216,11 @@ hz::ExpectedVoid<SmartctlParserError> SmartctlJsonBasicParser::parse_section_bas
auto p = retrieval_func(json_root_node, key, displayable_name);
if (p.has_value()) { // ignore if not found
p->section = StoragePropertySection::Info;
if (p->generic_name == "smart_status/passed") {
p->section = StoragePropertySection::OverallHealth;
} else {
p->section = StoragePropertySection::Info;
}
add_property(p.value());
}
}