From 0e8b149718bf9a962d3f4880062fa33672914da0 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Sun, 23 Nov 2025 13:33:36 +0100 Subject: [PATCH] Add partial filesystem data display for debugging - Make filesystem display more forgiving - show partial data if available - Will display usage% even if GB values are missing, or vice versa - This should help identify which specific metrics aren't being populated - Debug version to identify filesystem data population issues --- Cargo.lock | 6 +++--- agent/Cargo.toml | 2 +- dashboard/Cargo.toml | 2 +- dashboard/src/ui/widgets/system.rs | 9 +++++++++ shared/Cargo.toml | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c23c18b..3a1bd4a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "cm-dashboard" -version = "0.1.105" +version = "0.1.107" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cm-dashboard-agent" -version = "0.1.105" +version = "0.1.107" dependencies = [ "anyhow", "async-trait", @@ -324,7 +324,7 @@ dependencies = [ [[package]] name = "cm-dashboard-shared" -version = "0.1.105" +version = "0.1.107" dependencies = [ "chrono", "serde", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index 2d8368b..bf68cce 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-agent" -version = "0.1.107" +version = "0.1.108" edition = "2021" [dependencies] diff --git a/dashboard/Cargo.toml b/dashboard/Cargo.toml index e4fb3cd..1469bf3 100644 --- a/dashboard/Cargo.toml +++ b/dashboard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard" -version = "0.1.107" +version = "0.1.108" edition = "2021" [dependencies] diff --git a/dashboard/src/ui/widgets/system.rs b/dashboard/src/ui/widgets/system.rs index 26c544d..fc58066 100644 --- a/dashboard/src/ui/widgets/system.rs +++ b/dashboard/src/ui/widgets/system.rs @@ -562,6 +562,15 @@ impl SystemWidget { (Some(pct), Some(used), Some(total)) => { format!("{}: {:.0}% {:.1}GB/{:.1}GB", filesystem.mount_point, pct, used, total) } + (Some(pct), _, Some(total)) => { + format!("{}: {:.0}% —GB/{:.1}GB", filesystem.mount_point, pct, total) + } + (Some(pct), _, _) => { + format!("{}: {:.0}% —GB/—GB", filesystem.mount_point, pct) + } + (_, Some(used), Some(total)) => { + format!("{}: —% {:.1}GB/{:.1}GB", filesystem.mount_point, used, total) + } _ => format!("{}: —% —GB/—GB", filesystem.mount_point), }; diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 2d09fea..1082edb 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-shared" -version = "0.1.107" +version = "0.1.108" edition = "2021" [dependencies]