diff --git a/Cargo.lock b/Cargo.lock index 62ab080..b5100a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "cm-dashboard" -version = "0.1.238" +version = "0.1.239" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cm-dashboard-agent" -version = "0.1.238" +version = "0.1.239" dependencies = [ "anyhow", "async-trait", @@ -325,7 +325,7 @@ dependencies = [ [[package]] name = "cm-dashboard-shared" -version = "0.1.238" +version = "0.1.239" dependencies = [ "chrono", "serde", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index bb2ec01..c19c539 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-agent" -version = "0.1.238" +version = "0.1.239" edition = "2021" [dependencies] diff --git a/agent/src/collectors/systemd.rs b/agent/src/collectors/systemd.rs index 3187038..8c66146 100644 --- a/agent/src/collectors/systemd.rs +++ b/agent/src/collectors/systemd.rs @@ -152,7 +152,7 @@ impl SystemdCollector { sub_services.push(SubServiceData { name: image_name.to_string(), - service_status: self.calculate_service_status(&image_name, &image_status), + service_status: Status::Info, // Informational only, no status icon metrics, service_type: "image".to_string(), }); diff --git a/dashboard/Cargo.toml b/dashboard/Cargo.toml index ccf886e..f74a0bd 100644 --- a/dashboard/Cargo.toml +++ b/dashboard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard" -version = "0.1.238" +version = "0.1.239" edition = "2021" [dependencies] diff --git a/dashboard/src/ui/widgets/services.rs b/dashboard/src/ui/widgets/services.rs index 62b26a2..f0f5524 100644 --- a/dashboard/src/ui/widgets/services.rs +++ b/dashboard/src/ui/widgets/services.rs @@ -273,37 +273,9 @@ impl ServicesWidget { }; let tree_symbol = if is_last { "└─" } else { "├─" }; - // Docker images use docker whale icon - if info.service_type == "image" { - vec![ - // Indentation and tree prefix - ratatui::text::Span::styled( - format!(" {} ", tree_symbol), - Typography::tree(), - ), - // Docker icon (simple character for performance) - ratatui::text::Span::styled( - "D ".to_string(), - Style::default().fg(Theme::highlight()).bg(Theme::background()), - ), - // Service name - ratatui::text::Span::styled( - format!("{:<18} ", short_name), - Style::default() - .fg(Theme::secondary_text()) - .bg(Theme::background()), - ), - // Status/metrics text - ratatui::text::Span::styled( - status_str, - Style::default() - .fg(Theme::secondary_text()) - .bg(Theme::background()), - ), - ] - } else if info.widget_status == Status::Info { - // Informational data - no status icon - vec![ + if info.widget_status == Status::Info { + // Informational data - no status icon, show metrics if available + let mut spans = vec![ // Indentation and tree prefix ratatui::text::Span::styled( format!(" {} ", tree_symbol), @@ -311,12 +283,24 @@ impl ServicesWidget { ), // Service name (no icon) ratatui::text::Span::styled( - short_name, + format!("{:<18} ", short_name), Style::default() .fg(Theme::secondary_text()) .bg(Theme::background()), ), - ] + ]; + + // Add metrics if available (e.g., Docker image size) + if !status_str.is_empty() { + spans.push(ratatui::text::Span::styled( + status_str, + Style::default() + .fg(Theme::secondary_text()) + .bg(Theme::background()), + )); + } + + spans } else { vec![ // Indentation and tree prefix diff --git a/shared/Cargo.toml b/shared/Cargo.toml index c7b6111..11a0f73 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-shared" -version = "0.1.238" +version = "0.1.239" edition = "2021" [dependencies]