Enable on/off for gathering network totals.

This commit is contained in:
Herbert Wolverson 2024-03-20 15:17:11 -05:00
parent aed4e042e7
commit ece4057efa

View File

@ -6,7 +6,6 @@
//! components are managed. //! components are managed.
use crate::{bus::BusCommand, widgets::*}; use crate::{bus::BusCommand, widgets::*};
use lqos_bus::BusClient;
use ratatui::prelude::*; use ratatui::prelude::*;
use std::io::Stdout; use std::io::Stdout;
use tokio::sync::mpsc::Sender; use tokio::sync::mpsc::Sender;
@ -33,9 +32,9 @@ impl TopUi {
'c' => self.show_cpus = !self.show_cpus, 'c' => self.show_cpus = !self.show_cpus,
'n' => { 'n' => {
self.show_throughput_sparkline = !self.show_throughput_sparkline; self.show_throughput_sparkline = !self.show_throughput_sparkline;
commander.send(BusCommand::CollectTotalThroughput( commander.blocking_send(BusCommand::CollectTotalThroughput(
self.show_throughput_sparkline, self.show_throughput_sparkline,
)); )).unwrap();
} }
_ => {} _ => {}
} }