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:
14
agent/src/cache/mod.rs
vendored
14
agent/src/cache/mod.rs
vendored
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user