Files
cm-dashboard/dashboard/src/ui/widgets/mod.rs
Christoffer Martinsson 516d159d2f
All checks were successful
Build and Release / build-and-release (push) Successful in 1m36s
Reorganize dashboard UI with tabbed layout and improved status bars
Add tabbed navigation in right panel with "hosts | services" tabs to
better utilize vertical space. Hosts tab displays all available hosts
with blue selector bar (j/k navigation, Enter to switch). Services tab
shows services for currently selected host.

Status bar improvements:
- Move dashboard IP to top-right status bar (non-bold)
- Restructure bottom status bar with right-aligned build/agent versions
- Fix overflow crashes using saturating_sub for small terminal windows

Additional changes:
- Add HostsWidget with scroll handling and mouse click support
- Bold styling for currently active host
- Create render_content() methods to avoid nested blocks in tabs
- Display SMB share read/write mode in share listings
2025-12-14 10:03:33 +01:00

16 lines
380 B
Rust

use cm_dashboard_shared::AgentData;
pub mod hosts;
pub mod services;
pub mod system;
pub use hosts::HostsWidget;
pub use services::ServicesWidget;
pub use system::SystemWidget;
/// Widget trait for UI components that display structured data
pub trait Widget {
/// Update widget with structured agent data
fn update_from_agent_data(&mut self, agent_data: &AgentData);
}