Expand boot diagnostic sections
This commit is contained in:
parent
783e31a582
commit
3674fbdee7
3 changed files with 34 additions and 29 deletions
|
|
@ -89,30 +89,35 @@
|
||||||
},
|
},
|
||||||
// Diagnostic modes
|
// Diagnostic modes
|
||||||
"DiagMenu": {
|
"DiagMenu": {
|
||||||
|
"<Enter>": "Process",
|
||||||
"<q>": "Quit", // Quit the application
|
"<q>": "Quit", // Quit the application
|
||||||
"<Ctrl-d>": "Quit", // Another way to quit
|
"<Ctrl-d>": "Quit", // Another way to quit
|
||||||
"<Ctrl-c>": "Quit", // Yet another way to quit
|
"<Ctrl-c>": "Quit", // Yet another way to quit
|
||||||
"<Ctrl-z>": "Suspend" // Suspend the application
|
"<Ctrl-z>": "Suspend" // Suspend the application
|
||||||
},
|
},
|
||||||
"BootDiags": {
|
"BootDiags": {
|
||||||
|
"<Enter>": "Process",
|
||||||
"<q>": "Quit", // Quit the application
|
"<q>": "Quit", // Quit the application
|
||||||
"<Ctrl-d>": "Quit", // Another way to quit
|
"<Ctrl-d>": "Quit", // Another way to quit
|
||||||
"<Ctrl-c>": "Quit", // Yet another way to quit
|
"<Ctrl-c>": "Quit", // Yet another way to quit
|
||||||
"<Ctrl-z>": "Suspend" // Suspend the application
|
"<Ctrl-z>": "Suspend" // Suspend the application
|
||||||
},
|
},
|
||||||
"BootSetup": {
|
"BootSetup": {
|
||||||
|
"<Enter>": "Process",
|
||||||
"<q>": "Quit", // Quit the application
|
"<q>": "Quit", // Quit the application
|
||||||
"<Ctrl-d>": "Quit", // Another way to quit
|
"<Ctrl-d>": "Quit", // Another way to quit
|
||||||
"<Ctrl-c>": "Quit", // Yet another way to quit
|
"<Ctrl-c>": "Quit", // Yet another way to quit
|
||||||
"<Ctrl-z>": "Suspend" // Suspend the application
|
"<Ctrl-z>": "Suspend" // Suspend the application
|
||||||
},
|
},
|
||||||
"InjectDrivers": {
|
"InjectDrivers": {
|
||||||
|
"<Enter>": "Process",
|
||||||
"<q>": "Quit", // Quit the application
|
"<q>": "Quit", // Quit the application
|
||||||
"<Ctrl-d>": "Quit", // Another way to quit
|
"<Ctrl-d>": "Quit", // Another way to quit
|
||||||
"<Ctrl-c>": "Quit", // Yet another way to quit
|
"<Ctrl-c>": "Quit", // Yet another way to quit
|
||||||
"<Ctrl-z>": "Suspend" // Suspend the application
|
"<Ctrl-z>": "Suspend" // Suspend the application
|
||||||
},
|
},
|
||||||
"ToggleSafeBoot": {
|
"ToggleSafeBoot": {
|
||||||
|
"<Enter>": "Process",
|
||||||
"<q>": "Quit", // Quit the application
|
"<q>": "Quit", // Quit the application
|
||||||
"<Ctrl-d>": "Quit", // Another way to quit
|
"<Ctrl-d>": "Quit", // Another way to quit
|
||||||
"<Ctrl-c>": "Quit", // Yet another way to quit
|
"<Ctrl-c>": "Quit", // Yet another way to quit
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ impl App {
|
||||||
action_rx,
|
action_rx,
|
||||||
action_tx,
|
action_tx,
|
||||||
components: vec![
|
components: vec![
|
||||||
Box::new(Title::new()),
|
Box::new(Title::new(cli_cmd)),
|
||||||
Box::new(FpsCounter::new()),
|
Box::new(FpsCounter::new()),
|
||||||
Box::new(Left::new()),
|
Box::new(Left::new()),
|
||||||
Box::new(Right::new()),
|
Box::new(Right::new()),
|
||||||
|
|
@ -158,14 +158,11 @@ impl App {
|
||||||
(_, Mode::Failed) => Mode::Failed,
|
(_, Mode::Failed) => Mode::Failed,
|
||||||
|
|
||||||
// Diagnostic states
|
// Diagnostic states
|
||||||
(
|
(_, Mode::DiagMenu) => Mode::BootDiags,
|
||||||
_,
|
(_, Mode::BootDiags) => Mode::BootSetup,
|
||||||
Mode::DiagMenu
|
(_, Mode::BootSetup) => Mode::InjectDrivers,
|
||||||
| Mode::BootDiags
|
(_, Mode::InjectDrivers) => Mode::ToggleSafeBoot,
|
||||||
| Mode::BootSetup
|
(_, Mode::ToggleSafeBoot) => Mode::Done,
|
||||||
| Mode::InjectDrivers
|
|
||||||
| Mode::ToggleSafeBoot,
|
|
||||||
) => Mode::DiagMenu,
|
|
||||||
|
|
||||||
// Invalid states
|
// Invalid states
|
||||||
(_, Mode::Confirm) => panic!("This shouldn't happen."),
|
(_, Mode::Confirm) => panic!("This shouldn't happen."),
|
||||||
|
|
@ -318,10 +315,7 @@ impl App {
|
||||||
action_tx.send(Action::SetMode(Mode::ScanDisks))?;
|
action_tx.send(Action::SetMode(Mode::ScanDisks))?;
|
||||||
}
|
}
|
||||||
cli::Command::Diagnose => {
|
cli::Command::Diagnose => {
|
||||||
action_tx.send(Action::DisplayPopup(
|
action_tx.send(Action::SetMode(Mode::DiagMenu))?;
|
||||||
popup::Type::Info,
|
|
||||||
String::from("Boot Diagnostics?"),
|
|
||||||
))?;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,15 @@ impl Component for Left {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Mode::DiagMenu
|
||||||
|
| Mode::BootDiags
|
||||||
|
| Mode::BootSetup
|
||||||
|
| Mode::InjectDrivers
|
||||||
|
| Mode::ToggleSafeBoot => {
|
||||||
|
if let Some(command_tx) = self.command_tx.clone() {
|
||||||
|
command_tx.send(Action::NextScreen)?;
|
||||||
|
}
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
Action::Select(Some(index), None) => self.selections[0] = Some(index),
|
Action::Select(Some(index), None) => self.selections[0] = Some(index),
|
||||||
|
|
@ -219,14 +228,11 @@ impl Component for Left {
|
||||||
}
|
}
|
||||||
(_, Mode::Done | Mode::Failed) => self.title_text = String::from("Done"),
|
(_, Mode::Done | Mode::Failed) => self.title_text = String::from("Done"),
|
||||||
// Diagnostic states
|
// Diagnostic states
|
||||||
(
|
(_, Mode::DiagMenu) => self.title_text = String::from("Main Menu"),
|
||||||
_,
|
(_, Mode::BootDiags) => self.title_text = String::from("Boot Diagnostics"),
|
||||||
Mode::DiagMenu
|
(_, Mode::BootSetup) => self.title_text = String::from("Boot Setup"),
|
||||||
| Mode::BootDiags
|
(_, Mode::InjectDrivers) => self.title_text = String::from("Inject Drivers"),
|
||||||
| Mode::BootSetup
|
(_, Mode::ToggleSafeBoot) => self.title_text = String::from("Toggle Safe Mode"),
|
||||||
| Mode::InjectDrivers
|
|
||||||
| Mode::ToggleSafeBoot,
|
|
||||||
) => self.title_text = String::from("Boot Diagnostics"),
|
|
||||||
|
|
||||||
// Invalid states
|
// Invalid states
|
||||||
(_, Mode::Confirm) => panic!("This shouldn't happen."),
|
(_, Mode::Confirm) => panic!("This shouldn't happen."),
|
||||||
|
|
@ -280,10 +286,18 @@ impl Component for Left {
|
||||||
|
|
||||||
// Body
|
// Body
|
||||||
match self.mode {
|
match self.mode {
|
||||||
|
// Clone modes
|
||||||
Mode::ScanDisks
|
Mode::ScanDisks
|
||||||
| Mode::PreClone
|
| Mode::PreClone
|
||||||
| Mode::Clone
|
| Mode::Clone
|
||||||
| Mode::PostClone
|
| Mode::PostClone
|
||||||
|
// Diagnostic modes
|
||||||
|
| Mode::DiagMenu
|
||||||
|
| Mode::BootDiags
|
||||||
|
| Mode::BootSetup
|
||||||
|
| Mode::InjectDrivers
|
||||||
|
| Mode::ToggleSafeBoot
|
||||||
|
// Done
|
||||||
| Mode::Done
|
| Mode::Done
|
||||||
| Mode::Failed => {
|
| Mode::Failed => {
|
||||||
// Leave blank
|
// Leave blank
|
||||||
|
|
@ -391,14 +405,6 @@ impl Component for Left {
|
||||||
_ => panic!("This shouldn't happen."),
|
_ => panic!("This shouldn't happen."),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Mode::DiagMenu
|
|
||||||
| Mode::BootDiags
|
|
||||||
| Mode::BootSetup
|
|
||||||
| Mode::InjectDrivers
|
|
||||||
| Mode::ToggleSafeBoot => {
|
|
||||||
// Diagnostic modes
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue