From 7e1962a1687a5dea3d0f8aaf9db07dbc0f517cb5 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Mon, 1 Dec 2025 19:42:05 +0100 Subject: [PATCH] Remove ZMQ debug packet counter from display - Remove ZMQ stats display from system widget - Remove update_zmq_stats method - Remove zmq_packets_received and zmq_last_packet_age fields - Clean up display to only show essential information --- Cargo.lock | 6 +++--- agent/Cargo.toml | 2 +- dashboard/Cargo.toml | 2 +- dashboard/src/ui/mod.rs | 8 -------- dashboard/src/ui/widgets/system.rs | 24 ------------------------ shared/Cargo.toml | 2 +- 6 files changed, 6 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b527611..5362c10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "cm-dashboard" -version = "0.1.241" +version = "0.1.242" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cm-dashboard-agent" -version = "0.1.241" +version = "0.1.242" dependencies = [ "anyhow", "async-trait", @@ -325,7 +325,7 @@ dependencies = [ [[package]] name = "cm-dashboard-shared" -version = "0.1.241" +version = "0.1.242" dependencies = [ "chrono", "serde", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index 5af1b2f..2f0733d 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-agent" -version = "0.1.242" +version = "0.1.243" edition = "2021" [dependencies] diff --git a/dashboard/Cargo.toml b/dashboard/Cargo.toml index bdb62b9..3a0d3bd 100644 --- a/dashboard/Cargo.toml +++ b/dashboard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard" -version = "0.1.242" +version = "0.1.243" edition = "2021" [dependencies] diff --git a/dashboard/src/ui/mod.rs b/dashboard/src/ui/mod.rs index 012c84e..d767263 100644 --- a/dashboard/src/ui/mod.rs +++ b/dashboard/src/ui/mod.rs @@ -110,14 +110,6 @@ impl TuiApp { host_widgets.system_widget.update_from_agent_data(agent_data); host_widgets.services_widget.update_from_agent_data(agent_data); - // Update ZMQ stats - if let Some(zmq_stats) = metric_store.get_zmq_stats(&hostname) { - host_widgets.system_widget.update_zmq_stats( - zmq_stats.packets_received, - zmq_stats.last_packet_age_secs - ); - } - host_widgets.last_update = Some(Instant::now()); } } diff --git a/dashboard/src/ui/widgets/system.rs b/dashboard/src/ui/widgets/system.rs index 8ed54d8..fef829f 100644 --- a/dashboard/src/ui/widgets/system.rs +++ b/dashboard/src/ui/widgets/system.rs @@ -15,10 +15,6 @@ pub struct SystemWidget { nixos_build: Option, agent_hash: Option, - // ZMQ communication stats - zmq_packets_received: Option, - zmq_last_packet_age: Option, - // Network interfaces network_interfaces: Vec, @@ -92,8 +88,6 @@ impl SystemWidget { Self { nixos_build: None, agent_hash: None, - zmq_packets_received: None, - zmq_last_packet_age: None, network_interfaces: Vec::new(), cpu_load_1min: None, cpu_load_5min: None, @@ -159,12 +153,6 @@ impl SystemWidget { pub fn _get_agent_hash(&self) -> Option<&String> { self.agent_hash.as_ref() } - - /// Update ZMQ communication statistics - pub fn update_zmq_stats(&mut self, packets_received: u64, last_packet_age_secs: f64) { - self.zmq_packets_received = Some(packets_received); - self.zmq_last_packet_age = Some(last_packet_age_secs); - } } use super::Widget; @@ -811,18 +799,6 @@ impl SystemWidget { Span::styled(format!("Agent: {}", agent_version_text), Typography::secondary()) ])); - // ZMQ communication stats - if let (Some(packets), Some(age)) = (self.zmq_packets_received, self.zmq_last_packet_age) { - let age_text = if age < 1.0 { - format!("{:.0}ms ago", age * 1000.0) - } else { - format!("{:.1}s ago", age) - }; - lines.push(Line::from(vec![ - Span::styled(format!("ZMQ: {} pkts, last {}", packets, age_text), Typography::secondary()) - ])); - } - // CPU section lines.push(Line::from(vec![ Span::styled("CPU:", Typography::widget_title()) diff --git a/shared/Cargo.toml b/shared/Cargo.toml index d2aa76b..4959f74 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-shared" -version = "0.1.242" +version = "0.1.243" edition = "2021" [dependencies]