From 1d0e325813ddea19755a516d4d4d30a7ad7e7b7e Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Thu, 31 Oct 2024 15:21:02 +0400 Subject: [PATCH] JSON Basic Parser: Make sure the health property is in the health section (fixes GUI not displaying health after first scan). --- src/applib/smartctl_json_basic_parser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/applib/smartctl_json_basic_parser.cpp b/src/applib/smartctl_json_basic_parser.cpp index 539018f..0d32e5d 100644 --- a/src/applib/smartctl_json_basic_parser.cpp +++ b/src/applib/smartctl_json_basic_parser.cpp @@ -216,7 +216,11 @@ hz::ExpectedVoid 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()); } }