Remove Docker image icon and use Status::Info
All checks were successful
Build and Release / build-and-release (push) Successful in 1m20s

Docker images now use Status::Info like VPN IP.
No "D" prefix, no status icon - just name and metrics.
All informational sub-services handled consistently.

Version: v0.1.239
This commit is contained in:
Christoffer Martinsson 2025-12-01 18:45:28 +01:00
parent bdfff942f7
commit 5c3ac8b15e
6 changed files with 24 additions and 40 deletions

6
Cargo.lock generated
View File

@ -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",

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard-agent"
version = "0.1.238"
version = "0.1.239"
edition = "2021"
[dependencies]

View File

@ -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(),
});

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard"
version = "0.1.238"
version = "0.1.239"
edition = "2021"
[dependencies]

View File

@ -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

View File

@ -1,6 +1,6 @@
[package]
name = "cm-dashboard-shared"
version = "0.1.238"
version = "0.1.239"
edition = "2021"
[dependencies]