Sanity checks as we approach release... bug patching:

* Fix for freeze not working (due to change with how we eat data)
* Fix for typos with newlines
* Made help box larger
* Made dd box larger
This commit is contained in:
ClementTsang 2020-02-17 23:28:06 -05:00
parent 48d2afc54a
commit 47b78d22f8
3 changed files with 15 additions and 13 deletions

View File

@ -140,6 +140,8 @@ impl Painter {
); );
} }
// TODO: [REFACTOR] We should clean this up tbh
#[allow(clippy::cognitive_complexity)]
pub fn draw_data<B: backend::Backend>( pub fn draw_data<B: backend::Backend>(
&mut self, terminal: &mut Terminal<B>, app_state: &mut app::App, &mut self, terminal: &mut Terminal<B>, app_state: &mut app::App,
) -> error::Result<()> { ) -> error::Result<()> {
@ -152,9 +154,9 @@ impl Painter {
.margin(1) .margin(1)
.constraints( .constraints(
[ [
Constraint::Percentage(30), Constraint::Percentage(20),
Constraint::Percentage(40), Constraint::Percentage(60),
Constraint::Percentage(30), Constraint::Percentage(20),
] ]
.as_ref(), .as_ref(),
) )
@ -210,9 +212,9 @@ impl Painter {
.margin(1) .margin(1)
.constraints( .constraints(
[ [
Constraint::Percentage(40), Constraint::Percentage(35),
Constraint::Percentage(20), Constraint::Percentage(30),
Constraint::Percentage(40), Constraint::Percentage(35),
] ]
.as_ref(), .as_ref(),
) )
@ -223,9 +225,9 @@ impl Painter {
.margin(0) .margin(0)
.constraints( .constraints(
[ [
Constraint::Percentage(30), Constraint::Percentage(25),
Constraint::Percentage(40), Constraint::Percentage(50),
Constraint::Percentage(30), Constraint::Percentage(25),
] ]
.as_ref(), .as_ref(),
) )
@ -260,7 +262,7 @@ impl Painter {
.render(&mut f, middle_dialog_chunk[1]); .render(&mut f, middle_dialog_chunk[1]);
} else if let Some(to_kill_processes) = app_state.get_to_delete_processes() { } else if let Some(to_kill_processes) = app_state.get_to_delete_processes() {
if let Some(first_pid) = to_kill_processes.1.first() { if let Some(first_pid) = to_kill_processes.1.first() {
let dd_text = [ let dd_text = vec![
if app_state.is_grouped() { if app_state.is_grouped() {
if to_kill_processes.1.len() != 1 { if to_kill_processes.1.len() != 1 {
Text::raw(format!( Text::raw(format!(

View File

@ -15,7 +15,7 @@ pub const DEFAULT_WINDOWS_CONFIG_FILE_PATH: &str = "";
pub const GENERAL_HELP_TEXT: [&str; 15] = [ pub const GENERAL_HELP_TEXT: [&str; 15] = [
"General Keybindings\n\n", "General Keybindings\n\n",
"q, Ctrl-c Quit bottom\n", "q, Ctrl-c Quit bottom\n",
"Esc Close filters, dialog boxes, etc.", "Esc Close filters, dialog boxes, etc.\n",
"Ctrl-r Reset all data\n", "Ctrl-r Reset all data\n",
"f Freeze display\n", "f Freeze display\n",
"Ctrl-Arrow Move currently selected widget\n", "Ctrl-Arrow Move currently selected widget\n",

View File

@ -230,9 +230,9 @@ fn main() -> error::Result<()> {
} }
Event::MouseInput(event) => handle_mouse_event(event, &mut app), Event::MouseInput(event) => handle_mouse_event(event, &mut app),
Event::Update(data) => { Event::Update(data) => {
if !app.is_frozen {
app.data_collection.eat_data(&data); app.data_collection.eat_data(&data);
if !app.is_frozen {
// Convert all data into tui-compliant components // Convert all data into tui-compliant components
// Network // Network