{% if hosts %}
{% for host in hosts %}
{% set d = latest.get(host.id) %}
{# Link to the host hub for logged-in users; plain text on the public share view (no auth, no token on the href). #}
{% if session.user_id %}
{{ host.name }}
{% else %}
{{ host.name }}
{% endif %}
{{ host.address }}
{% if d is none %}
—
{% elif d.status.value == 'resolved' %}
{{ d.resolved_ip or 'resolved' }}
{% else %}
Failed
{% endif %}
{% if d %}
{{ d.resolved_at.strftime('%H:%M:%S') }} UTC
{% endif %}