Remove hardcoded pool mount point mappings for true auto-discovery
All checks were successful
Build and Release / build-and-release (push) Successful in 1m19s
All checks were successful
Build and Release / build-and-release (push) Successful in 1m19s
- Eliminate hardcoded mappings like 'root' -> '/' and 'steampool' -> '/mnt/steampool' - Use device names directly for physical drives - Rely on mount_point metrics from agent for actual mount paths - Implement zero-configuration architecture as specified in CLAUDE.md
This commit is contained in:
@@ -146,16 +146,14 @@ impl SystemWidget {
|
||||
self.agent_hash.as_ref()
|
||||
}
|
||||
|
||||
/// Get mount point for a pool name
|
||||
/// Get default mount point for a pool name (fallback only - should use actual mount_point metrics)
|
||||
fn get_mount_point_for_pool(&self, pool_name: &str) -> String {
|
||||
match pool_name {
|
||||
"root" => "/".to_string(),
|
||||
"steampool" => "/mnt/steampool".to_string(),
|
||||
"steampool_1" => "/steampool_1".to_string(),
|
||||
"steampool_2" => "/steampool_2".to_string(),
|
||||
// For device names (nvme0n1, sda, etc.), use the device name directly
|
||||
name if name.starts_with("nvme") || name.starts_with("sd") || name.starts_with("hd") => name.to_string(),
|
||||
_ => format!("/{}", pool_name), // Default fallback for mount-based pools
|
||||
// For device names, use the device name directly as display name
|
||||
if pool_name.starts_with("nvme") || pool_name.starts_with("sd") || pool_name.starts_with("hd") {
|
||||
pool_name.to_string()
|
||||
} else {
|
||||
// For other pools, use the pool name as-is (will be overridden by mount_point metric)
|
||||
pool_name.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user