Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 477724b4f4 |
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
|
||||
|
||||
[[package]]
|
||||
name = "cm-dashboard"
|
||||
version = "0.1.243"
|
||||
version = "0.1.244"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@@ -301,7 +301,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cm-dashboard-agent"
|
||||
version = "0.1.243"
|
||||
version = "0.1.244"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -325,7 +325,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cm-dashboard-shared"
|
||||
version = "0.1.243"
|
||||
version = "0.1.244"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"serde",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard-agent"
|
||||
version = "0.1.244"
|
||||
version = "0.1.245"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -142,16 +142,11 @@ impl SystemdCollector {
|
||||
|
||||
// Add Docker images
|
||||
let docker_images = self.get_docker_images();
|
||||
for (image_name, image_status, image_size_mb) in docker_images {
|
||||
let mut metrics = Vec::new();
|
||||
metrics.push(SubServiceMetric {
|
||||
label: "size".to_string(),
|
||||
value: image_size_mb,
|
||||
unit: Some("MB".to_string()),
|
||||
});
|
||||
for (image_name, _image_status, image_size_mb) in docker_images {
|
||||
let metrics = Vec::new();
|
||||
|
||||
sub_services.push(SubServiceData {
|
||||
name: image_name.to_string(),
|
||||
name: format!("{} size: {:.1} MB", image_name, image_size_mb),
|
||||
service_status: Status::Info, // Informational only, no status icon
|
||||
metrics,
|
||||
service_type: "image".to_string(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard"
|
||||
version = "0.1.244"
|
||||
version = "0.1.245"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -230,9 +230,12 @@ impl ServicesWidget {
|
||||
info: &ServiceInfo,
|
||||
is_last: bool,
|
||||
) -> Vec<ratatui::text::Span<'static>> {
|
||||
// Informational sub-services (Status::Info) can use more width since they don't show columns
|
||||
let max_width = if info.widget_status == Status::Info { 50 } else { 18 };
|
||||
|
||||
// Truncate long sub-service names to fit layout (accounting for indentation)
|
||||
let short_name = if name.len() > 18 {
|
||||
format!("{}...", &name[..15])
|
||||
let short_name = if name.len() > max_width {
|
||||
format!("{}...", &name[..(max_width.saturating_sub(3))])
|
||||
} else {
|
||||
name.to_string()
|
||||
};
|
||||
@@ -281,9 +284,9 @@ impl ServicesWidget {
|
||||
format!(" {} ", tree_symbol),
|
||||
Typography::tree(),
|
||||
),
|
||||
// Service name (no icon)
|
||||
// Service name (no icon) - no fixed width padding for Info status
|
||||
ratatui::text::Span::styled(
|
||||
format!("{:<18} ", short_name),
|
||||
short_name,
|
||||
Style::default()
|
||||
.fg(Theme::secondary_text())
|
||||
.bg(Theme::background()),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cm-dashboard-shared"
|
||||
version = "0.1.244"
|
||||
version = "0.1.245"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
Reference in New Issue
Block a user