Skip to content

Commit

Permalink
Merge pull request #106 from 56quarters/dep-update
Browse files Browse the repository at this point in the history
Dependency updates
  • Loading branch information
56quarters authored Jan 24, 2024
2 parents ad4ee76 + 2198675 commit d5915d9
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 48 deletions.
90 changes: 56 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mtop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ edition = "2021"
clap = { version = "4.1.8", features = ["cargo", "derive", "help", "error-context", "std", "string", "usage", "wrap_help"], default_features = false }
crossterm = "0.27.0"
mtop-client = { path = "../mtop-client", version = "0.7.0" }
ratatui = "0.24.0"
ratatui = "0.25.0"
tokio = { version = "1.14.0", features = ["full"] }
tracing = "0.1.11"
tracing-subscriber = "0.3.16"
Expand Down
26 changes: 13 additions & 13 deletions mtop/src/ui/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,21 +190,21 @@ fn render_slabs_table(f: &mut Frame, area: Rect, delta: &StatsDelta, state: &mut
let selected_style = Style::default().bg(Color::Red).fg(Color::LightYellow);
let header = slab_table_header(header_style);
let rows = slab_table_rows(delta, &units);

let t = Table::new(rows)
let widths = &[
Constraint::Percentage(5), // ID
Constraint::Percentage(8), // size
Constraint::Percentage(8), // pages
Constraint::Percentage(13), // items
Constraint::Percentage(15), // memory
Constraint::Percentage(13), // max age
Constraint::Percentage(17), // unfetched
Constraint::Percentage(17), // expired
];

let t = Table::new(rows, widths)
.header(header)
.block(Block::default().borders(Borders::ALL).title("Slabs"))
.highlight_style(selected_style)
.widths(&[
Constraint::Percentage(5), // ID
Constraint::Percentage(8), // size
Constraint::Percentage(8), // pages
Constraint::Percentage(13), // items
Constraint::Percentage(15), // memory
Constraint::Percentage(13), // max age
Constraint::Percentage(17), // unfetched
Constraint::Percentage(17), // expired
]);
.highlight_style(selected_style);

f.render_stateful_widget(t, area, state);
}
Expand Down

0 comments on commit d5915d9

Please sign in to comment.