Remove Docker image icon and use Status::Info
All checks were successful
Build and Release / build-and-release (push) Successful in 1m20s
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:
parent
bdfff942f7
commit
5c3ac8b15e
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard"
|
name = "cm-dashboard"
|
||||||
version = "0.1.238"
|
version = "0.1.239"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@ -301,7 +301,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard-agent"
|
name = "cm-dashboard-agent"
|
||||||
version = "0.1.238"
|
version = "0.1.239"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -325,7 +325,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard-shared"
|
name = "cm-dashboard-shared"
|
||||||
version = "0.1.238"
|
version = "0.1.239"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard-agent"
|
name = "cm-dashboard-agent"
|
||||||
version = "0.1.238"
|
version = "0.1.239"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -152,7 +152,7 @@ impl SystemdCollector {
|
|||||||
|
|
||||||
sub_services.push(SubServiceData {
|
sub_services.push(SubServiceData {
|
||||||
name: image_name.to_string(),
|
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,
|
metrics,
|
||||||
service_type: "image".to_string(),
|
service_type: "image".to_string(),
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard"
|
name = "cm-dashboard"
|
||||||
version = "0.1.238"
|
version = "0.1.239"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -273,37 +273,9 @@ impl ServicesWidget {
|
|||||||
};
|
};
|
||||||
let tree_symbol = if is_last { "└─" } else { "├─" };
|
let tree_symbol = if is_last { "└─" } else { "├─" };
|
||||||
|
|
||||||
// Docker images use docker whale icon
|
if info.widget_status == Status::Info {
|
||||||
if info.service_type == "image" {
|
// Informational data - no status icon, show metrics if available
|
||||||
vec![
|
let mut spans = 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![
|
|
||||||
// Indentation and tree prefix
|
// Indentation and tree prefix
|
||||||
ratatui::text::Span::styled(
|
ratatui::text::Span::styled(
|
||||||
format!(" {} ", tree_symbol),
|
format!(" {} ", tree_symbol),
|
||||||
@ -311,12 +283,24 @@ impl ServicesWidget {
|
|||||||
),
|
),
|
||||||
// Service name (no icon)
|
// Service name (no icon)
|
||||||
ratatui::text::Span::styled(
|
ratatui::text::Span::styled(
|
||||||
short_name,
|
format!("{:<18} ", short_name),
|
||||||
Style::default()
|
Style::default()
|
||||||
.fg(Theme::secondary_text())
|
.fg(Theme::secondary_text())
|
||||||
.bg(Theme::background()),
|
.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 {
|
} else {
|
||||||
vec![
|
vec![
|
||||||
// Indentation and tree prefix
|
// Indentation and tree prefix
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard-shared"
|
name = "cm-dashboard-shared"
|
||||||
version = "0.1.238"
|
version = "0.1.239"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user