From 29b974a1f7d7d61345f37189b5c142d571512e7c Mon Sep 17 00:00:00 2001 From: serversdown Date: Thu, 11 Jun 2026 18:01:27 +0000 Subject: [PATCH] =?UTF-8?q?feat(portal):=20M2b-1=20=E2=80=94=20alert=20rul?= =?UTF-8?q?e=20config=20UI=20on=20the=20SLM=20detail=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds an "Alerts" card to /slm/{id}: lists rules and a create/edit/delete form (simple-first — "Alert when [Leq] is [above] [65] dB for [N] s", optional time-of-day window + day picker, advanced hysteresis/cooldown collapsed). Talks to the existing SLMM alert CRUD via the proxy (/api/slmm/{unit}/alerts/rules); no SLMM changes. Rule changes invalidate the evaluator's cache server-side. Verified: alerts script JS balances, slm_detail.html parses, and the TV proxy forwards method + JSON body + query params for POST/PUT/DELETE. Co-Authored-By: Claude Opus 4.8 --- templates/slm_detail.html | 186 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) diff --git a/templates/slm_detail.html b/templates/slm_detail.html index 6a17ea8..def5ed4 100644 --- a/templates/slm_detail.html +++ b/templates/slm_detail.html @@ -112,4 +112,190 @@ + + +
+
+
+

Alerts

+

Threshold rules evaluated on this device's live feed.

+
+ +
+ +
+ + + +
+ + {% endblock %}