{# status/widget.html โ€” the dashboard Overview (#5213): everything that needs attention, across hosts, monitors and alerts, with since-times. The Monitors widget is the full list of checks; this is the summary. #} {% from "_macros.html" import status_badge %} {% set firing = alerts | selectattr("label", "in", ["firing", "no_data"]) | list %}
{% if session.user_id %}{% endif %} {{ total_hosts }}host{{ '' if total_hosts == 1 else 's' }} {% if session.user_id %}{% endif %} Monitors {{ up }}up {{ down }}down {% if pending %}{{ pending }}pending{% endif %} {% if session.user_id %}{% endif %} Alerts {{ firing|length }}firing {% if session.user_id %}{% endif %}
{% set problems = entries | rejectattr("status", "equalto", "up") | list %} {% if not problems and not alerts %}
{% if entries %}โœ“ All {{ up }} monitors are up and no alert is firing.{% else %}No monitors configured, and no alert is firing.{% endif %}
{% else %}
{% for a in alerts[:6] %}
{{ status_badge(a.label) }} {% set nm_style = "flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" %} {% if session.user_id %} {{ a.rule.name }} {% else %}{{ a.rule.name }}{% endif %} {{ a.since|ago }}
{% endfor %} {% for e in problems[:8] %}
{{ status_badge(e.status) }} {% set nm_style = "flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" %} {# Link to the monitor's own detail view for logged-in users; plain text on the public share view. #} {% if session.user_id and e.detail_url %} {{ e.name }} {% else %} {{ e.name }} {% endif %} {{ e.kind|monitor_type }} {% if e.since %}{% if e.since_at_least %}over {% endif %}{{ e.since|ago }}{% endif %}
{% endfor %} {% if alerts|length > 6 or problems|length > 8 %}
{% if alerts|length > 6 %}+{{ alerts|length - 6 }} more alerts{% endif %} {% if problems|length > 8 %}{% if alerts|length > 6 %} ยท {% endif %}+{{ problems|length - 8 }} more monitors{% endif %} {% if session.user_id %} โ€” Status{% endif %}
{% endif %}
{% endif %}