{# plugins/snmp/templates/snmp/widget.html — the dashboard SNMP widget (#5255, milestone 491): a verdict, devices not answering first with why, then the rest, each with two readings in their units. The name links to its page. #} {% from "_macros.html" import status_dot %} {% if not total %}
| Device | Readings | Polled |
|---|---|---|
| {{- status_dot({'down': 'down', 'stale': 'stale', 'pending': 'pending'}.get(d.reach, 'up')) -}} {% if session.user_id %}{{ d.name }}{% else %}{{ d.name }}{% endif %} {%- if d.reach == 'down' %}{% if d.ok_at %}no reply since {{ d.ok_at|ago }}{% else %}never answered{% endif %} {%- elif d.reach == 'stale' %}not polled since {{ d.polled_at|ago }} {%- elif d.reach == 'pending' %}not polled yet{% endif %} | {%- for r in d.key %}{{ r.name }} {{ r.text }}{% if not loop.last %} · {% endif %}{% else %}—{% endfor -%} | {% if d.polled_at %}{{ d.polled_at|ago }}{% else %}—{% endif %} |