feat(dashboard): per-metric sparklines in the Host Agent — Resources widget
Operator ask: show the graphs next to their fields in the fleet widget, like the host page's AGENT panel. Each row now renders cpu/mem/disk/load as a value with a trend sparkline beneath it (1h window), instead of bare numbers. - _fleet_rows fetches a per-host recent series (cpu/mem/load host-level, disk from the root mount) in one 1h query and attaches a sparkline per metric to each row. - widget_table.html lays out a metric cell (label + threshold-coloured value + sparkline) per field, mirroring panel.html. Threshold colour is computed in the loop and passed into the cell macro (keeps Jinja macro scope clean). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -270,7 +270,7 @@ WIDGET_REGISTRY: dict[str, dict] = {
|
||||
"host_resources": {
|
||||
"key": "host_resources",
|
||||
"label": "Host Agent — Resources",
|
||||
"description": "Fleet view: CPU, memory, disk, and load per monitored host",
|
||||
"description": "Fleet view: CPU, memory, disk, and load per host — each with a trend sparkline",
|
||||
"hx_url": "/plugins/host_agent/widget",
|
||||
"detail_url": "/hosts/",
|
||||
"plugin": "host_agent",
|
||||
|
||||
Reference in New Issue
Block a user