Improve dashboard UI layout and status aggregation
All checks were successful
Build and Release / build-and-release (push) Successful in 1m36s

- Move hosts panel to left side above system panel
- Add dynamic column layout for hosts based on available width
- Fix status aggregation to properly calculate host status from widgets
- Align service panel columns with header
- Use blue color for metrics without status indicators
- Add offline host popup overlay
- Use foreground color for panel titles
This commit is contained in:
2025-12-16 13:15:24 +01:00
parent 41a7ee660a
commit 535784e849
10 changed files with 342 additions and 447 deletions

View File

@@ -178,6 +178,36 @@ impl SystemWidget {
pub fn get_kernel_version(&self) -> Option<String> {
self.kernel_version.clone()
}
/// Get overall status by aggregating all component statuses
pub fn get_overall_status(&self) -> Status {
if !self.has_data {
return Status::Offline;
}
let mut statuses = vec![self.cpu_status, self.memory_status, self.backup_status];
// Add storage pool and drive statuses
for pool in &self.storage_pools {
statuses.push(pool.status);
for drive in &pool.drives {
statuses.push(drive.status);
}
for drive in &pool.data_drives {
statuses.push(drive.status);
}
for drive in &pool.parity_drives {
statuses.push(drive.status);
}
}
// Add backup repository statuses
for repo in &self.backup_repositories {
statuses.push(repo.status);
}
Status::aggregate(&statuses)
}
}
use super::Widget;