Clean up unused imports and fix build warnings

- Remove unused imports (Duration, HashMap, SharedError, DateTime, etc.)
- Fix unused variables by prefixing with underscore
- Remove redundant dashboard.toml config file
- Update theme imports to use only needed components
- Maintain all functionality while reducing warnings
- Add srv02 to predefined hosts configuration
- Remove unused broadcast_command methods
This commit is contained in:
2025-10-18 23:12:07 +02:00
parent f0eec38655
commit 7f85a6436e
21 changed files with 27 additions and 150 deletions

View File

@@ -1,7 +1,7 @@
use anyhow::Result;
use async_trait::async_trait;
use cm_dashboard_shared::{Metric, MetricValue, Status};
use std::collections::HashMap;
use std::process::Command;
use std::time::Instant;
use tracing::debug;
@@ -398,7 +398,7 @@ impl Collector for DiskCollector {
}
// Add SMART health metrics for each unique physical device
for (physical_device, disks) in physical_devices {
for (physical_device, _disks) in physical_devices {
let (health_status, temperature) = self.get_smart_health(&physical_device);
let device_name = physical_device.strip_prefix("/dev/").unwrap_or(&physical_device);
let timestamp = chrono::Utc::now().timestamp() as u64;