{# alerts/_active.html — the Alerts page's Active section, polled on its own: firing first, then no data, then acknowledged, then pending (alert_svc.active_rows). An acknowledged alert says how long it has been breaching, and apart from that who acknowledged it and when. #} {% from "_macros.html" import status_badge, empty_state %} {% set can_edit = session.user_role in ('operator', 'admin') %} {% if active %}
| State | What is wrong | Rule | |
|---|---|---|---|
| {{ status_badge(row.label, title=("No sample since " ~ (row.state.last_sample_at.strftime('%Y-%m-%d %H:%M UTC') if row.state.last_sample_at else 'the rule started watching')) if row.label == 'no_data' else none) }} {% if row.state.no_data_since and row.label != 'no_data' %} {{ status_badge('no_data', title="Silent since " ~ row.state.no_data_since.strftime('%Y-%m-%d %H:%M UTC')) }} {% endif %} |
{{- row.says.lead -}}
{%- if row.url %}{{ row.says.resource }}{% else %}{{ row.says.resource }}{% endif -%}
{{- row.says.tail -}}
{%- if row.label == 'acknowledged' and row.state.acknowledged_at %}
Acknowledged{% if row.acked_by %} by {{ row.acked_by }}{% endif %} {{ row.state.acknowledged_at|ago }}
{%- endif %}
|
{{ row.rule.name }} | {% if can_edit and row.state.state.value == 'firing' %} {% endif %} |