Skip to content

Commit

Permalink
Add pipeline top upstream producers and improve plugins details (#11)
Browse files Browse the repository at this point in the history
This commit changed the dropped events percentage color from yellow to dark gray for the `logstash-filter-drop` plugin, it also added the bulk requests failures count for the `logstash-output-elasticsearch` plugin details, and the "Top upstream producers" list for `pipeline` input plugins.
  • Loading branch information
edmocosta authored Jan 3, 2025
1 parent 2b76aa0 commit c906568
Show file tree
Hide file tree
Showing 6 changed files with 268 additions and 92 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.6.0
- Changed the dropped events percentage color from yellow to dark gray for the `logstash-filter-drop` plugin.
- The `logstash-output-elasticsearch` plugin details now shows the bulk requests failures.
- Added the "Top upstream producers" list on the `pipeline` input plugin details.
- Minor UI improvements.
- Bumped dependencies versions.

## 0.5.0
- Added support for vertices and edges files diagnostics.
- The thread name is now displayed on the traces details block.
Expand Down
28 changes: 20 additions & 8 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 @@ -7,7 +7,7 @@ documentation = "https://github.com/edmocosta/tuistash"
keywords = ["logstash", "tui", "cli", "terminal"]
categories = ["command-line-utilities"]
authors = ["Edmo Vamerlatti Costa <[email protected]>"]
version = "0.5.0"
version = "0.6.0"
edition = "2021"

[dependencies]
Expand All @@ -20,7 +20,7 @@ rustls = { version = "0.23.5", default-features = false }
colored_json = { version = "5.0", default-features = false }
humansize = { version = "2.1", default-features = false }
humantime = { version = "2.1" }
ratatui = { version = "0.28.1", features = ["crossterm", "unstable-rendered-line-info"] }
ratatui = { version = "0.29.0", features = ["crossterm", "unstable-rendered-line-info"] }
crossterm = { version = "0.28.1", default-features = false, features = ["event-stream"] }
human_format = { version = "1.1" }
uuid = { version = "1.10.0", features = ["v4"] }
Expand Down
36 changes: 18 additions & 18 deletions src/cli/commands/tui/flows/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ fn draw_pipelines_table(f: &mut Frame, app: &mut App, area: Rect) {
.header(header)
.block(Block::default().borders(Borders::ALL).title("Pipelines"))
.column_spacing(2)
.highlight_style(TABLE_SELECTED_ROW_STYLE)
.row_highlight_style(TABLE_SELECTED_ROW_STYLE)
.highlight_symbol(TABLE_SELECTED_ROW_SYMBOL);

f.render_stateful_widget(
Expand Down Expand Up @@ -365,18 +365,18 @@ fn draw_selected_pipeline_input_plugins(f: &mut Frame, app: &mut App, area: Rect
.style(TABLE_HEADER_ROW_STYLE)
.height(1);

let widths: Vec<Constraint> = vec![Constraint::Ratio(rows.len() as u32, 1); rows.len()];
let widths: Vec<Constraint> = vec![
Constraint::Percentage(30), // Name
Constraint::Percentage(30), // Type
Constraint::Percentage(40), // Throughput
];

let pipelines = Table::new(rows, widths)
.header(header)
.block(Block::default().borders(Borders::ALL).title("Inputs"))
.column_spacing(2)
.highlight_style(TABLE_SELECTED_ROW_STYLE)
.highlight_symbol(TABLE_SELECTED_ROW_SYMBOL)
.widths([
Constraint::Percentage(30), // Name
Constraint::Percentage(30), // Type
Constraint::Percentage(40), // Throughput
]);
.row_highlight_style(TABLE_SELECTED_ROW_STYLE)
.highlight_symbol(TABLE_SELECTED_ROW_SYMBOL);

f.render_stateful_widget(
pipelines,
Expand Down Expand Up @@ -432,19 +432,19 @@ fn draw_selected_pipeline_other_plugins(f: &mut Frame, app: &mut App, area: Rect
.style(TABLE_HEADER_ROW_STYLE)
.height(1);

let widths: Vec<Constraint> = vec![Constraint::Ratio(rows.len() as u32, 1); rows.len()];
let widths: Vec<Constraint> = vec![
Constraint::Percentage(40), // Name
Constraint::Percentage(10), // Type
Constraint::Percentage(25), // Worker millis per event
Constraint::Percentage(25), // Worker utilization
];

let pipelines = Table::new(rows, widths)
.header(header)
.block(Block::default().borders(Borders::ALL).title("Plugins"))
.column_spacing(2)
.highlight_style(TABLE_SELECTED_ROW_STYLE)
.highlight_symbol(TABLE_SELECTED_ROW_SYMBOL)
.widths([
Constraint::Percentage(40), // Name
Constraint::Percentage(10), // Type
Constraint::Percentage(25), // Worker millis per event
Constraint::Percentage(25), // Worker utilization
]);
.row_highlight_style(TABLE_SELECTED_ROW_STYLE)
.highlight_symbol(TABLE_SELECTED_ROW_SYMBOL);

f.render_stateful_widget(
pipelines,
Expand Down
Loading

0 comments on commit c906568

Please sign in to comment.