Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tui: make client bottom layouts visible again #2368

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions libafl/src/monitors/tui/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,15 @@ impl TuiUI {

let left_top_layout = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Length(6), Constraint::Length(0)].as_ref())
.constraints([Constraint::Length(6), Constraint::Length(5)].as_ref())
.split(left_layout[0]);
let left_bottom_layout = left_top_layout[1];
self.draw_process_timing_text(f, app, left_top_layout[0], false);
self.draw_client_generic_text(f, app, left_bottom_layout);

let right_top_layout = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Length(7), Constraint::Length(0)].as_ref())
.constraints([Constraint::Length(7), Constraint::Length(5)].as_ref())
.split(right_layout);
let right_bottom_layout = right_top_layout[1];
self.draw_item_geometry_text(f, app, right_top_layout[0], false);
Expand Down Expand Up @@ -646,10 +646,6 @@ impl TuiUI {
]
};

let chunks = Layout::default()
.constraints([Constraint::Percentage(100)].as_ref())
.split(area);

let table = Table::default()
.rows(items)
.block(
Expand All @@ -663,7 +659,7 @@ impl TuiUI {
.borders(Borders::ALL),
)
.widths([Constraint::Ratio(1, 2), Constraint::Ratio(1, 2)]);
f.render_widget(table, chunks[0]);
f.render_widget(table, area);
}

fn draw_client_generic_text(
Expand Down Expand Up @@ -702,10 +698,6 @@ impl TuiUI {
]
};

let chunks = Layout::default()
.constraints([Constraint::Percentage(100)].as_ref())
.split(area);

let table = Table::default()
.rows(items)
.block(
Expand All @@ -719,7 +711,7 @@ impl TuiUI {
.borders(Borders::ALL),
)
.widths([Constraint::Ratio(1, 2), Constraint::Ratio(1, 2)]);
f.render_widget(table, chunks[0]);
f.render_widget(table, area);
}

#[cfg(feature = "introspection")]
Expand Down
Loading