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:
parent
f24c4ed650
commit
ba03623110
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard"
|
name = "cm-dashboard"
|
||||||
version = "0.1.126"
|
version = "0.1.127"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@ -301,7 +301,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard-agent"
|
name = "cm-dashboard-agent"
|
||||||
version = "0.1.126"
|
version = "0.1.127"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -324,7 +324,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard-shared"
|
name = "cm-dashboard-shared"
|
||||||
version = "0.1.126"
|
version = "0.1.127"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard-agent"
|
name = "cm-dashboard-agent"
|
||||||
version = "0.1.126"
|
version = "0.1.127"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard"
|
name = "cm-dashboard"
|
||||||
version = "0.1.126"
|
version = "0.1.127"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -146,16 +146,14 @@ impl SystemWidget {
|
|||||||
self.agent_hash.as_ref()
|
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 {
|
fn get_mount_point_for_pool(&self, pool_name: &str) -> String {
|
||||||
match pool_name {
|
// For device names, use the device name directly as display name
|
||||||
"root" => "/".to_string(),
|
if pool_name.starts_with("nvme") || pool_name.starts_with("sd") || pool_name.starts_with("hd") {
|
||||||
"steampool" => "/mnt/steampool".to_string(),
|
pool_name.to_string()
|
||||||
"steampool_1" => "/steampool_1".to_string(),
|
} else {
|
||||||
"steampool_2" => "/steampool_2".to_string(),
|
// For other pools, use the pool name as-is (will be overridden by mount_point metric)
|
||||||
// For device names (nvme0n1, sda, etc.), use the device name directly
|
pool_name.to_string()
|
||||||
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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard-shared"
|
name = "cm-dashboard-shared"
|
||||||
version = "0.1.126"
|
version = "0.1.127"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user