Compare commits
No commits in common. "46e53ef105633e9f513130cbf651711a3074d052" and "1d0b6920286266ca6b8143d2e8226289d34eaff0" have entirely different histories.
46e53ef105
...
1d0b692028
5 changed files with 4 additions and 54 deletions
|
|
@ -630,6 +630,7 @@ impl App {
|
||||||
"Program Files",
|
"Program Files",
|
||||||
"Program Files (x86)",
|
"Program Files (x86)",
|
||||||
"ProgramData",
|
"ProgramData",
|
||||||
|
"Haha.....no",
|
||||||
"Windows\\System32\\config",
|
"Windows\\System32\\config",
|
||||||
]
|
]
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,7 @@ use core::{
|
||||||
config::Config,
|
config::Config,
|
||||||
state::Mode,
|
state::Mode,
|
||||||
};
|
};
|
||||||
use std::{
|
use std::sync::{Arc, Mutex};
|
||||||
cmp::min,
|
|
||||||
sync::{Arc, Mutex},
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::diags::DiagGroup;
|
use crate::diags::DiagGroup;
|
||||||
|
|
||||||
|
|
@ -78,51 +75,11 @@ impl Component for LogView {
|
||||||
}
|
}
|
||||||
Action::KeyDown => {
|
Action::KeyDown => {
|
||||||
if self.mode == Mode::LogView {
|
if self.mode == Mode::LogView {
|
||||||
let new_index = self.line_index + 1;
|
self.line_index = self.line_index + 1;
|
||||||
if let Some(log_text) = self.list.get_selected() {
|
|
||||||
let lines: Vec<&str> = log_text.split('\n').collect();
|
|
||||||
if new_index as usize > lines.len() {
|
|
||||||
self.line_index = lines.len() as u16;
|
|
||||||
} else {
|
|
||||||
self.line_index = new_index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
self.list.next();
|
self.list.next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Action::KeyPageUp => {
|
|
||||||
if self.mode == Mode::LogView {
|
|
||||||
if self.line_index > 10 {
|
|
||||||
self.line_index -= 10;
|
|
||||||
} else {
|
|
||||||
self.line_index = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Action::KeyPageDown => {
|
|
||||||
if self.mode == Mode::LogView {
|
|
||||||
let new_index = self.line_index + 10;
|
|
||||||
if let Some(log_text) = self.list.get_selected() {
|
|
||||||
let lines: Vec<&str> = log_text.split('\n').collect();
|
|
||||||
let new_index: u16 = min((lines.len() - 3) as u16, new_index);
|
|
||||||
self.line_index = new_index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Action::KeyHome => {
|
|
||||||
if self.mode == Mode::LogView {
|
|
||||||
self.line_index = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Action::KeyEnd => {
|
|
||||||
if self.mode == Mode::LogView {
|
|
||||||
if let Some(log_text) = self.list.get_selected() {
|
|
||||||
let lines: Vec<&str> = log_text.split('\n').collect();
|
|
||||||
self.line_index = (lines.len() - 3) as u16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Action::Process => {
|
Action::Process => {
|
||||||
if self.mode == Mode::LogView {
|
if self.mode == Mode::LogView {
|
||||||
if let Some(command_tx) = self.command_tx.clone() {
|
if let Some(command_tx) = self.command_tx.clone() {
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ pub fn parse_dism(diag_group: &mut DiagGroup, task_result: TaskResult) {
|
||||||
format!("{stdout}\n\n-------\n\n{stderr}")
|
format!("{stdout}\n\n-------\n\n{stderr}")
|
||||||
};
|
};
|
||||||
|
|
||||||
if output_text.contains("No component store corruption detected") {
|
if output_text.contains("no component store corruption detected") {
|
||||||
diag_group.passed.push(true);
|
diag_group.passed.push(true);
|
||||||
diag_group.result = String::from("OK");
|
diag_group.result = String::from("OK");
|
||||||
diag_group.logs.push(Log {
|
diag_group.logs.push(Log {
|
||||||
|
|
|
||||||
|
|
@ -137,10 +137,6 @@
|
||||||
"<Esc>": "Process",
|
"<Esc>": "Process",
|
||||||
"<Up>": "KeyUp",
|
"<Up>": "KeyUp",
|
||||||
"<Down>": "KeyDown",
|
"<Down>": "KeyDown",
|
||||||
"<PageUp>": "KeyPageUp",
|
|
||||||
"<PageDown>": "KeyPageDown",
|
|
||||||
"<Home>": "KeyHome",
|
|
||||||
"<End>": "KeyEnd",
|
|
||||||
"<q>": "Quit",
|
"<q>": "Quit",
|
||||||
"<Ctrl-d>": "Quit",
|
"<Ctrl-d>": "Quit",
|
||||||
"<Ctrl-c>": "Quit",
|
"<Ctrl-c>": "Quit",
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,6 @@ pub enum Action {
|
||||||
KeyUp,
|
KeyUp,
|
||||||
KeyLeft,
|
KeyLeft,
|
||||||
KeyRight,
|
KeyRight,
|
||||||
KeyPageUp,
|
|
||||||
KeyPageDown,
|
|
||||||
KeyHome,
|
|
||||||
KeyEnd,
|
|
||||||
Quit,
|
Quit,
|
||||||
Render,
|
Render,
|
||||||
Resize(u16, u16),
|
Resize(u16, u16),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue