{# plugins/snmp/templates/snmp/index.html — every SNMP device, those not answering first, each saying what its newest poll found: its readings in their units, or why it didn't answer (milestone 491). #} {% extends "base.html" %} {% from "_macros.html" import page_header, status_badge, stat_tile, empty_state %} {% block title %}SNMP — Steward{% endblock %} {% block content %} {% set admin = session.user_role == 'admin' %} {% call page_header("SNMP devices", (devices|length ~ " device" ~ ("s" if devices|length != 1 else "")) if devices else none) %} {% if admin %}Add device{% endif %} {% endcall %} {% if not devices %}
{{ d.says }}
{%- if d.ok_at %}Last answered {{ d.ok_at|ago }}; the readings below are from then.{% else %}It has never answered.{% endif %} Tried {{ d.polled_at|ago }}.
{% elif d.reach == 'stale' %}{{ d.says }} Last polled {{ d.polled_at|ago }}.
{% elif d.reach == 'pending' %}Not polled yet: the first poll runs within a minute of saving.
{% endif %} {% if d.reach != 'pending' and d.readings %}Not answered by this device: {{ d.missing|join(", ") }}. It may not support them; Edit to remove them.
{% endif %}