feat(widgets): Overview verdict, pending monitors' age, fullest filesystems first (#5810)
- Overview: a verdict line when something is wrong ('1 alert firing, 1
monitor down.'); its picker description now says what it lists (alerts,
monitors down, anomalies). Host figures have their home in Hosts.
Comments no longer name the Status page that was folded into Monitors.
- Monitors widget: a monitor not checked yet says when it was added.
- Host page: filesystems fullest first, by the worse of space and inodes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -167,3 +167,17 @@ def test_the_page_lists_unwired_sensors_apart_hottest_first():
|
||||
assert list(real) == ["Package id 0", "Composite", "CPUTIN", "gone"]
|
||||
assert list(unwired) == ["SYSTIN", "AUXTIN0", "PCH_CHIP_TEMP"]
|
||||
assert unwired["SYSTIN"] == (115.0, "reads a value no wired sensor gives")
|
||||
|
||||
|
||||
def test_the_host_page_lists_filesystems_fullest_first():
|
||||
"""#5810: by the worse of space and inodes, so a full /var/lib/docker
|
||||
doesn't sort after /boot; ties by name."""
|
||||
from plugins.host_agent.routes import _split_host_metrics
|
||||
latest = {"h": {"cpu_pct": 1.0},
|
||||
"h:/": {"disk_used_pct": 40.0, "inodes_used_pct": 5.0},
|
||||
"h:/boot": {"disk_used_pct": 30.0},
|
||||
"h:/var/lib/docker": {"disk_used_pct": 91.0},
|
||||
"h:/srv": {"disk_used_pct": 20.0, "inodes_used_pct": 97.0},
|
||||
"h:/data": {"disk_used_pct": 30.0}}
|
||||
*_, mounts = _split_host_metrics("h", latest)
|
||||
assert list(mounts) == ["/srv", "/var/lib/docker", "/", "/boot", "/data"]
|
||||
|
||||
Reference in New Issue
Block a user