Compare commits

...

2 commits

2 changed files with 28 additions and 3 deletions

View file

@ -86,8 +86,23 @@ impl Component for Progress {
&result, &text
);
if let Some(line) = self.lines.last_mut() {
line.result = result;
line.text = text;
let old_result = line.result.clone();
match (old_result, result.clone()) {
(DiagResult::Pass, _) => {
line.result = result;
line.text = text;
}
(DiagResult::Warn, DiagResult::Pass | DiagResult::Warn) => {
line.text = String::from("Unknown");
}
(DiagResult::Warn, DiagResult::Fail) => {
line.result = DiagResult::Fail;
line.text = String::from("Unknown");
}
(DiagResult::Fail, _) => {
line.text = String::from("Unknown");
}
};
}
}
Action::DiagLineEnd { text } => {

View file

@ -425,7 +425,17 @@ pub fn parse_registry_hives(
diag_group.result = String::from("OK");
diag_group.logs.push(Log {
label: String::from("Registry"),
summary: Vec::new(),
summary: if hive.is_some() {
vec![DVLine {
line_parts: vec![
format!("Registry ({}): ", hive.unwrap()),
String::from("OK"),
],
line_colors: vec![Color::Reset, Color::Green],
}]
} else {
Vec::new()
},
raw: output_text,
});
} else {