Fix storage display and improve UI formatting

- Fix duplicate storage pool issue by clearing cache on agent startup
- Change storage pool header text to normal color for better readability
- Improve services panel tree icons with proper └─ symbols for last items
- Ensure fresh metrics data on each agent restart
This commit is contained in:
2025-10-22 23:02:16 +02:00
parent 52d630a2e5
commit 14aae90954
3 changed files with 23 additions and 9 deletions

View File

@@ -19,8 +19,8 @@ impl SimpleCache {
persist_path: config.persist_path,
};
// Load from disk on startup
cache.load_from_disk();
// Clear cache file on startup to ensure fresh data
cache.clear_cache_file();
cache
}
@@ -82,6 +82,16 @@ impl SimpleCache {
}
}
}
/// Clear cache file on startup to ensure fresh data
fn clear_cache_file(&self) {
if Path::new(&self.persist_path).exists() {
match fs::remove_file(&self.persist_path) {
Ok(_) => info!("Cleared cache file {} on startup", self.persist_path),
Err(e) => warn!("Failed to clear cache file {}: {}", self.persist_path, e),
}
}
}
}