cockpit: battery/power card; van-battery publishes thresholds in state
New "Battery / Power" card shows mains vs battery, charge % with a severity- colored bar (only bites while on battery), the last alert level, and the configured warn/shutdown thresholds. van-battery now includes warn_levels + shutdown_level in /run/van-battery/state.json so the card stays self-describing instead of hardcoding the numbers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
52e948654e
commit
473a75c729
@@ -13,6 +13,11 @@ th { color: #6a6e73; font-weight: 600; }
|
||||
.ok { background: #bde5b8; color: #1e4f18; }
|
||||
.bad { background: #f0b8b8; color: #5f1414; }
|
||||
.warn { background: #f5d9a8; color: #5f4414; }
|
||||
.bar { height: 10px; border-radius: 5px; background: #e5e5e5; overflow: hidden; max-width: 320px; margin: 4px 0; }
|
||||
.bar-fill { height: 100%; transition: width 0.3s; }
|
||||
.bar-fill.ok { background: #3e8635; }
|
||||
.bar-fill.warn { background: #e08a00; }
|
||||
.bar-fill.crit { background: #c9190b; }
|
||||
.muted { color: #6a6e73; font-size: 12px; }
|
||||
.active-wan { font-weight: 700; color: #0066cc; }
|
||||
.btn { margin-left: 6px; padding: 3px 10px; cursor: pointer; }
|
||||
|
||||
Reference in New Issue
Block a user