Skip to content

Commit

Permalink
chore(deps): Bump ratatui from 0.23.0 to 0.24.0 (vectordotdev#18908)
Browse files Browse the repository at this point in the history
* chore(deps): Bump ratatui from 0.23.0 to 0.24.0

Bumps [ratatui](https://github.com/ratatui-org/ratatui) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/ratatui-org/ratatui/releases)
- [Changelog](https://github.com/ratatui-org/ratatui/blob/main/CHANGELOG.md)
- [Commits](ratatui/ratatui@v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: ratatui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* adapt to breaking changes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: neuronull <neuronull@pm.me>
  • Loading branch information
dependabot[bot] and neuronull authored Oct 23, 2023
1 parent 7debc60 commit 8b56a93
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
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

0 comments on commit 8b56a93

Please sign in to comment.