From 290b78679a136ecb879d76503ea20411e3643501 Mon Sep 17 00:00:00 2001 From: Jordan Date: Mon, 7 Sep 2020 05:02:16 -0700 Subject: add network-global family and ASN pages --- tor-metrics/templates/families.html | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tor-metrics/templates/families.html (limited to 'tor-metrics/templates/families.html') diff --git a/tor-metrics/templates/families.html b/tor-metrics/templates/families.html new file mode 100644 index 0000000..d1ae9d7 --- /dev/null +++ b/tor-metrics/templates/families.html @@ -0,0 +1,47 @@ +{% extends "skeleton.html" %} +{% block title %}Tor Relays :: Families{% endblock %} +{% block body %} +

Home :: Families

+

The set of all ({{ relays.json['sorted']['family']|length }}) relay families with > 1 effective members. The first_seen parameter is taken from the oldest relay in the family.

+ + + + + + + + + + {% set processed = dict() %} + {% for k, v in relays.json['sorted']['family'].items()|sort(attribute='1.bw', reverse=True) %} + {% if relays.json['relays'][v['relays'][0]]['fingerprint'] not in processed %} + + {% if v['bw'] > 1000000 %} + {% set obs_bandwidth = '%s %s'|format((v['bw'] / 1000000)|round(2, 'common'), 'MB/s') %} + {% else %} + {% set obs_bandwidth = '%s %s'|format((v['bw'] / 1000)|round(2, 'common'), 'KB/s') %}{% endif %} + + + + + + {% if v['contact'] %} + + {% else %} + {% endif %} + + + + + + + {% for r in v['relays'] %} + {% set _dummy = processed.update({relays.json['relay_subset'][r]['fingerprint']: None}) %} + {% endfor %} + + {% endif %} + {% endfor %} + +
FamilyBandwidthContactExit CountMiddle CountFirst Seen +
{{ k|escape }}{{ obs_bandwidth }}{{ v['contact']|truncate(50)|escape }}none{{ v['exit_count'] }}{{ v['middle_count'] }}{{ v['first_seen'].split(' ', 1)[0]|escape }}
+{% endblock %} -- cgit v1.2.3-54-g00ecf