Skip to content

Commit

Permalink
[wicket] update to ratatui 0.26 (#4991)
Browse files Browse the repository at this point in the history
Just a couple small updates.
  • Loading branch information
sunshowers authored Feb 6, 2024
1 parent ddd0367 commit 8f8cca5
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 50 deletions.
83 changes: 64 additions & 19 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ propolis-mock-server = { git = "https://github.com/oxidecomputer/propolis", rev
proptest = "1.4.0"
quote = "1.0"
rand = "0.8.5"
ratatui = "0.25.0"
ratatui = "0.26.0"
rayon = "1.8"
rcgen = "0.12.1"
reedline = "0.28.0"
Expand Down Expand Up @@ -400,7 +400,7 @@ trust-dns-server = "0.22"
trybuild = "1.0.89"
tufaceous = { path = "tufaceous" }
tufaceous-lib = { path = "tufaceous-lib" }
tui-tree-widget = "0.16.0"
tui-tree-widget = "0.17.0"
unicode-width = "0.1.11"
update-common = { path = "update-common" }
update-engine = { path = "update-engine" }
Expand Down
13 changes: 7 additions & 6 deletions wicket/src/ui/panes/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1435,12 +1435,13 @@ impl UpdatePane {
Constraint::Length(cell_width),
Constraint::Length(cell_width),
];
let header_table = Table::new(std::iter::empty(), &width_constraints)
.header(
Row::new(vec!["COMPONENT", "VERSION", "TARGET", "STATUS"])
.style(header_style),
)
.block(block.clone().title("OVERVIEW (* = active)"));
let header_table =
Table::new(std::iter::empty::<Row>(), &width_constraints)
.header(
Row::new(vec!["COMPONENT", "VERSION", "TARGET", "STATUS"])
.style(header_style),
)
.block(block.clone().title("OVERVIEW (* = active)"));
frame.render_widget(header_table, self.table_headers_rect);

// For the selected item, draw the version table.
Expand Down
43 changes: 20 additions & 23 deletions wicket/src/ui/widgets/ignition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,26 @@ impl IgnitionPopup {
format!("IGNITION: {}", component.to_string_uppercase()),
style::header(true),
)]),
body: Text {
lines: vec![
Line::from(vec![Span::styled(
"Power On",
style::line(
self.selected_command == IgnitionCommand::PowerOn,
),
)]),
Line::from(vec![Span::styled(
"Power Off",
style::line(
self.selected_command == IgnitionCommand::PowerOff,
),
)]),
Line::from(vec![Span::styled(
"Power Reset",
style::line(
self.selected_command
== IgnitionCommand::PowerReset,
),
)]),
],
},
body: Text::from(vec![
Line::from(vec![Span::styled(
"Power On",
style::line(
self.selected_command == IgnitionCommand::PowerOn,
),
)]),
Line::from(vec![Span::styled(
"Power Off",
style::line(
self.selected_command == IgnitionCommand::PowerOff,
),
)]),
Line::from(vec![Span::styled(
"Power Reset",
style::line(
self.selected_command == IgnitionCommand::PowerReset,
),
)]),
]),
buttons: vec![ButtonText::new("Close", "Esc")],
}
}
Expand Down

0 comments on commit 8f8cca5

Please sign in to comment.