Implement storage widget tree structure with themed status icons
Add proper hierarchical tree display for storage pools and drives: - Pool headers with status icons and type indication (Single/multi-drive) - Individual drive lines with ├─ tree symbols and health status - Usage summary with └─ end symbol and capacity status - T: and W: prefixes for temperature and wear level metrics - Themed status icons using StatusIcons::get_icon() with proper colors - 2-space indentation for clean tree structure appearance Replace flat storage display with beautiful tree format: ● Storage steampool (multi-drive): ├─ ● sdb T:35°C W:12% ├─ ● sdc T:38°C W:8% └─ ● 78.1% 1250.3GB/1600.0GB Uses agent-calculated status from NixOS-configured thresholds. Update CLAUDE.md with complete implementation specification.
This commit is contained in:
37
CLAUDE.md
37
CLAUDE.md
@@ -397,6 +397,43 @@ Agent → ["cpu_load_1min", "memory_usage_percent", ...] → Dashboard → Widge
|
||||
- [x] Eliminated configuration drift between defaults and deployed settings
|
||||
- [x] All cm-dashboard configuration now managed declaratively through NixOS
|
||||
|
||||
**In Progress:**
|
||||
- [ ] **Storage Widget Tree Structure Implementation (2025-10-22)**
|
||||
- [ ] Replace flat storage display with proper tree structure format
|
||||
- [ ] Implement themed status icons for pool/drive/usage status
|
||||
- [ ] Add tree symbols (├─, └─) with proper indentation for hierarchical display
|
||||
- [ ] Support T: and W: prefixes for temperature and wear metrics
|
||||
- [ ] Use agent-calculated status from NixOS-configured thresholds (no dashboard calculations)
|
||||
|
||||
### Storage Widget Tree Structure Specification
|
||||
|
||||
**Target Display Format:**
|
||||
```
|
||||
● Storage steampool (Raid0):
|
||||
├─ ● sdb T:35°C W:12%
|
||||
├─ ● sdc T:38°C W:8%
|
||||
└─ ● 78.1% 1250.3GB/1600.0GB
|
||||
```
|
||||
|
||||
**Status Icon Sources:**
|
||||
- **Pool Status**: Aggregated status from pool health + usage (`disk_{pool}_usage_percent` metric status)
|
||||
- **Drive Status**: Individual SMART health status (`disk_{pool}_{drive}_health` metric status)
|
||||
- **Usage Status**: Disk usage level status (`disk_{pool}_usage_percent` metric status)
|
||||
|
||||
**Implementation Details:**
|
||||
- **Tree Symbols**: `├─` for intermediate lines, `└─` for final line
|
||||
- **Indentation**: 2 spaces before tree symbols
|
||||
- **Status Icons**: Use `StatusIcons::get_icon(status)` with themed colors
|
||||
- **Temperature Format**: `T:{temp}°C` from `disk_{pool}_{drive}_temperature` metrics
|
||||
- **Wear Format**: `W:{wear}%` from `disk_{pool}_{drive}_wear_percent` metrics
|
||||
- **Pool Type**: Determine from drive count (Single/multi-drive) or RAID type detection
|
||||
- **Status Calculation**: Dashboard displays agent-calculated status, no threshold evaluation
|
||||
|
||||
**Layout Constraints:**
|
||||
- Dynamic: 1 header + N drives + 1 usage line per storage pool
|
||||
- Supports multiple storage pools with proper spacing
|
||||
- Truncation indicator if pools exceed available display space
|
||||
|
||||
**Production Configuration:**
|
||||
- CPU load thresholds: Warning ≥ 9.0, Critical ≥ 10.0
|
||||
- CPU temperature thresholds: Warning ≥ 100°C, Critical ≥ 100°C (effectively disabled)
|
||||
|
||||
Reference in New Issue
Block a user