Fix Console language support and named frame monitoring cards

This commit is contained in:
way
2026-10-17 23:07:49 +08:00
parent d2498ba68b
commit f45eefa31b
8 changed files with 116 additions and 8 deletions
+10
View File
@@ -168,3 +168,13 @@ def test_current_frame_flow_api_contract(tmp_path):
m["key"] == "service_ready" and m["value"] == 1 for m in snapshot["metrics"]
)
assert any(r["type"] == "device" for r in snapshot["resources"])
def test_metric_and_alert_labels_follow_console_language(endpoint):
device, _, _ = endpoint
snapshot = worker.collect(device)
assert all(set(metric["label"]) == {"zh", "en"} for metric in snapshot["metrics"])
assert all(set(alert["label"]) == {"zh", "en"} for alert in snapshot["alerts"])
frame = next(r for r in snapshot["resources"] if r["type"] == "device")
assert frame["id"] == "device:frame"
assert frame["name"] == "Frame"