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

chore(deps): Bump ratatui from 0.23.0 to 0.24.0 #18908

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ itertools = { version = "0.11.0", default-features = false }
crossterm = { version = "0.27.0", default-features = false, features = ["event-stream", "windows"], optional = true }
num-format = { version = "0.4.4", default-features = false, features = ["with-num-bigint"], optional = true }
number_prefix = { version = "0.4.0", default-features = false, features = ["std"], optional = true }
ratatui = { version = "0.23.0", optional = true, default-features = false, features = ["crossterm"] }
ratatui = { version = "0.24.0", optional = true, default-features = false, features = ["crossterm"] }

# Datadog Pipelines

Expand Down
17 changes: 6 additions & 11 deletions src/top/dashboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crossterm::{
use num_format::{Locale, ToFormattedString};
use number_prefix::NumberPrefix;
use ratatui::{
backend::{Backend, CrosstermBackend},
backend::CrosstermBackend,
layout::{Alignment, Constraint, Layout, Rect},
style::{Color, Modifier, Style},
text::{Line, Span},
Expand Down Expand Up @@ -164,12 +164,7 @@ impl<'a> Widgets<'a> {
}

/// Renders a title and the URL the dashboard is currently connected to.
fn title<B: Backend>(
&'a self,
f: &mut Frame<B>,
area: Rect,
connection_status: &ConnectionStatus,
) {
fn title(&'a self, f: &mut Frame, area: Rect, connection_status: &ConnectionStatus) {
let mut text = vec![
Span::from(self.url_string),
Span::styled(
Expand All @@ -195,7 +190,7 @@ impl<'a> Widgets<'a> {

/// Renders a components table, showing sources, transforms and sinks in tabular form, with
/// statistics pulled from `ComponentsState`,
fn components_table<B: Backend>(&self, f: &mut Frame<B>, state: &state::State, area: Rect) {
fn components_table(&self, f: &mut Frame, state: &state::State, area: Rect) {
// Header columns
let header = HEADER
.iter()
Expand Down Expand Up @@ -301,7 +296,7 @@ impl<'a> Widgets<'a> {
}

/// Alerts the user to resize the window to view columns
fn components_resize_window<B: Backend>(&self, f: &mut Frame<B>, area: Rect) {
fn components_resize_window(&self, f: &mut Frame, area: Rect) {
let block = Block::default().borders(Borders::ALL).title("Components");
let w = Paragraph::new("Expand the window to > 80 chars to view metrics")
.block(block)
Expand All @@ -311,7 +306,7 @@ impl<'a> Widgets<'a> {
}

/// Renders a box showing instructions on how to exit from `vector top`.
fn quit_box<B: Backend>(&self, f: &mut Frame<B>, area: Rect) {
fn quit_box(&self, f: &mut Frame, area: Rect) {
let text = vec![Line::from("To quit, press ESC or 'q'")];

let block = Block::default()
Expand All @@ -326,7 +321,7 @@ impl<'a> Widgets<'a> {
}

/// Draw a single frame. Creates a layout and renders widgets into it.
fn draw<B: Backend>(&self, f: &mut Frame<B>, state: state::State) {
fn draw(&self, f: &mut Frame, state: state::State) {
let size = f.size();
let rects = Layout::default()
.constraints(self.constraints.clone())
Expand Down
Loading