{% from "_macros.html" import state_label %} {% if peers_hidden %} {% endif %} {% if discovery_error %} {% endif %} {% if notes %} {% for c in notes.copies %} {% endfor %} {% for d in notes.shared %} {% endfor %} {% if notes.other_key %} {% endif %} {% if notes.versions %} {% endif %} {% if notes.legacy %} {% endif %} {% endif %}
{% for n in nodes %} {% for m in n.mappings %} {# ids as in _mappings_body.html, by the node's address: this node's own mappings are in this table too #} {% set rid = 'c-' ~ ((n.addr ~ '-' ~ m.id)|domid) %} {% endfor %} {% if n.online and not n.mappings %} {% endif %} {% else %} {% endfor %}
{{ _("Mapping") }}{{ _("Serial") }}{{ _("Network") }} {{ _("State") }}{{ _("Clients") }}{{ _("In / Out") }}
{{ n.name }} {% if n.self %}{{ _("this node") }}{% endif %} {% if n.source == 'manual' %}{{ _("manual") }}{% endif %} {{ n.addr }} {% if n.reported %}({{ _("its own address: %(addr)s", addr=n.reported) }}){% endif %} {% if n.online %} · {{ _("up %(uptime)s", uptime=n.uptime) }}{% if n.version %} · v{{ n.version }}{% endif %} · {{ _("%(running)s/%(total)s running", running=n.running_count, total=n.mapping_count) }} {% if n.age == 'older' %}{{ _("older version") }}{% elif n.age == 'newer' %}{{ _("newer version") }}{% endif %} {% if not n.self and 'control' not in n.caps %}{{ _("view only") }} {% elif not n.self and 'edit' not in n.caps %}{{ _("no remote edit") }}{% endif %} {% if n.auth == 'legacy' %}{{ _("unsigned key") }}{% endif %} {% if n.previous_key %}{{ _("previous key") }}{% endif %} {% elif n.problem == 'key' %} {{ _("cluster key rejected — check the key on that node") }} {% elif n.problem == 'cluster-off' %} {{ _("its cluster is switched off") }} {% elif n.problem == 'legacy-off' %} {{ _("2.8.0 or older — legacy authentication is off on this node") }} {% elif n.problem == 'manual-only' %} {{ _("2.8.0 or older and doesn’t advertise its LAN address — add it as a manual peer (Settings → LAN cluster) to manage it") }} {% elif n.problem == 'unsigned' %} {{ _("its answer is not signed with the cluster key") }} {% elif n.problem == 'clock' %} {{ _("its clock could not be matched") }} {% else %} {{ _("offline / unreachable") }} {% endif %} {% if not n.self and n.online and n.url %}{{ _("Open") }}{% endif %}
{{ m.name|softbreak }}{% if not m.enabled %} {{ _("disabled") }}{% endif %} {{ m.serial|softbreak }}
{{ m.endpoint|softbreak }}
{{ m.kind }}
{{ state_label(m.state) }}{% if m.link == 'down' %} {{ _("link down") }}{% endif %} {{ m.client_count }} {{ m.bytes_in|default('')|bytesize }} / {{ m.bytes_out|default('')|bytesize }} {% if can_edit and not n.self and 'control' in n.caps %}
{# the peer by host + port only: the server looks up its address and scheme #} {% set peer = {"host": n.ip, "port": n.port, "mid": m.id} %} {% if m.enabled %} {#- asked only while clients are connected, as on the node itself #} {#- (not `n`: that is the node, whose caps the Edit button below reads) #} {% set clients = m.client_count if m.client_count is number else 0 %} {% else %} {% endif %} {% if 'edit' in n.caps %}{% endif %}
{% endif %}
{{ _("no mappings on this node") }}
{{ _("No cluster nodes yet. Auto-discovery beacons run every few seconds; add manual peers under Settings → LAN cluster for routed networks.") }}