{% from "components/feedback.html" import badge, empty_state %} {# Alert rules panel — swapped into Notifications settings via HTMX. #}
When a value crosses a threshold, notify the channels subscribed to alert.fired. Checked every minute.
| Rule | Watches | Condition | Last value | State | |
|---|---|---|---|---|---|
| {{ r.name }}{% if not r.enabled %} paused{% endif %} | {{ r.source_label }} | {{ r.condition }}{% if r.for_seconds %} for {{ r.for_seconds }}s{% endif %} | {% if r.last_value is not none %}{{ "%g" | format(r.last_value) }}{% else %}—{% endif %} | {% if r.state == "firing" %}{{ badge("firing", "error") }} {% elif r.state == "pending" %}{{ badge("pending", "warning") }} {% elif r.state == "error" %}{{ badge("error", "warning") }} {% else %}{{ badge("ok", "success") }}{% endif %} |