{# alerts/_history_rows.html — the history table; swapped in on a range or rule change #} {% from "_macros.html" import status_badge, empty_state %} {% if events %}
{% for ev in events %} {% endfor %}
When (UTC) Rule Change Value Notified Action
{{ ev.at.strftime("%Y-%m-%d %H:%M:%S") }} {{ ev.rule.name }}
{{ ev.rule.source_module }}/{{ ev.rule.resource_name }}
{{ status_badge(ev.from_state) }} → {{ status_badge(ev.to_state) }} {% for n in ev.notes %}
{{ n }}
{% endfor %}
{{ ev.rule.metric_name }} = {{ ev.value }}
rule: {{ ev.condition }}
{% if ev.muted_by %} muted · {{ ev.muted_by }} {% if ev.released %}
notified when the window ended
{% endif %} {% endif %} {% for label, sent, error in ev.deliveries %}
{% if sent %} {{ label }} sent {% else %} {{ label }} failed {% if error %}
{{ error }}
{% endif %} {% endif %}
{% endfor %} {% if not ev.muted_by and not ev.deliveries %}—{% endif %}
{% if ev.ansible_run_id %} Ansible run {% else %}—{% endif %}
{% if truncated %}

Showing the newest {{ limit }}. Pick a shorter range or one rule to see the rest.

{% endif %} {% else %}
{{ empty_state("No alert changed state in the last " ~ current_range ~ ((" for " ~ chosen.name) if chosen else "") ~ ".") }}
{% endif %}