diff --git a/dashboard/src/ui/services.rs b/dashboard/src/ui/services.rs index dfd90a1..2808caa 100644 --- a/dashboard/src/ui/services.rs +++ b/dashboard/src/ui/services.rs @@ -50,7 +50,7 @@ fn render_metrics( let mut data = WidgetData::new( title, Some(WidgetStatus::new(widget_status)), - vec!["Service".to_string(), "RAM (GB)".to_string(), "CPU".to_string(), "Disk".to_string()] + vec!["Service".to_string(), "RAM (GB)".to_string(), "CPU (%)".to_string(), "Disk (GB)".to_string()] ); @@ -152,25 +152,14 @@ fn format_memory_value(used: f32, quota: f32) -> String { fn format_cpu_value(cpu_percent: f32) -> String { if cpu_percent >= 0.1 { - format!("{:.1}%", cpu_percent) + format!("{:.1}", cpu_percent) } else { - "0.0%".to_string() + "0.0".to_string() } } fn format_disk_value(used: f32, quota: f32) -> String { - if quota > 0.05 { - // Show usage/quota format when quota is set - format!("{:.1}/{:.1} GB", used, quota) - } else if used >= 1.0 { - format!("{:.1} GB", used) - } else if used >= 0.001 { - // 1 MB or more - format!("{:.0} MB", used * 1000.0) - } else if used > 0.0 { - "<1 MB".to_string() - } else { - "—".to_string() // Em dash for no disk usage - } + // Always show in GB format with usage/quota, no units (units in column header) + format!("{:.1}/{:.1}", used, quota) }