diff options
Diffstat (limited to 'tor-metrics/templates')
-rw-r--r-- | tor-metrics/templates/all.html | 6 | ||||
-rw-r--r-- | tor-metrics/templates/as.html | 6 | ||||
-rw-r--r-- | tor-metrics/templates/contact.html | 11 | ||||
-rw-r--r-- | tor-metrics/templates/country.html | 11 | ||||
-rw-r--r-- | tor-metrics/templates/family.html | 4 | ||||
-rw-r--r-- | tor-metrics/templates/first_seen.html | 4 | ||||
-rw-r--r-- | tor-metrics/templates/flag.html | 4 | ||||
-rw-r--r-- | tor-metrics/templates/index.html | 5 | ||||
-rw-r--r-- | tor-metrics/templates/misc-families.html | 60 | ||||
-rw-r--r-- | tor-metrics/templates/misc-networks.html | 54 | ||||
-rw-r--r-- | tor-metrics/templates/platform.html | 5 | ||||
-rw-r--r-- | tor-metrics/templates/relay-info.html | 176 | ||||
-rw-r--r-- | tor-metrics/templates/relay-list.html | 97 | ||||
-rw-r--r-- | tor-metrics/templates/skeleton.html | 56 |
14 files changed, 0 insertions, 499 deletions
diff --git a/tor-metrics/templates/all.html b/tor-metrics/templates/all.html deleted file mode 100644 index ef6c64a..0000000 --- a/tor-metrics/templates/all.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "relay-list.html" %} -{% set relay_count = relays.json['relays']|length %} -{% block title %}Tor Relays :: All{% endblock %} -{% block header %}<a href="./">Home</a> :: All Relays{% endblock %} -{% block description %}All known (non-guard) relays, {{ relay_count }} in total. A smaller browser-friendly subset (top 500) is <a href="./">available here</a>.{% endblock %} - diff --git a/tor-metrics/templates/as.html b/tor-metrics/templates/as.html deleted file mode 100644 index 41abcef..0000000 --- a/tor-metrics/templates/as.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "relay-list.html" %} -{% set as_number = relays.json['relay_subset'][0]['as']|escape %} -{% set as_name = relays.json['relay_subset'][0]['as_name']|escape %} -{% block title %}Tor Relays :: {{ as_number }}{% endblock %} -{% block header %}<a href="../../">Home</a> :: {{ as_number }}{% endblock %} -{% block description %}{{ as_number }} ({{ as_name }}) is responsible for ~{{ bandwidth }} MB/s of traffic, with {% if middle_count > 0 %}{{ middle_count }} middle relay{% if middle_count > 1 %}s{% endif %}{% if exit_count > 0 %} and {% endif %}{% endif %}{% if exit_count > 0 %}{{ exit_count }} exit relay{% if exit_count > 1 %}s{% endif %}{% endif %}.{% endblock %} diff --git a/tor-metrics/templates/contact.html b/tor-metrics/templates/contact.html deleted file mode 100644 index 10bfd93..0000000 --- a/tor-metrics/templates/contact.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "relay-list.html" %} -{% if relays.json['relay_subset'][0]['contact'] %} - {% set contact = relays.json['relay_subset'][0]['contact']|escape %} - {% set contact_hash = relays.json['relay_subset'][0]['contact']|hash %} -{% else %} - {% set contact = 'none' %} - {% set contact_hash = ''|hash %} -{% endif %} -{% block title %}Tor Relays :: Contact {{ contact_hash }}{% endblock %} -{% block header %}<a href="../../">Home</a> :: Contact {{ contact_hash }}{% endblock %} -{% block description %}Relays with contact info <code>{{ contact }}</code> are responsible for ~{{ bandwidth }} MB/s of traffic, with {% if middle_count > 0 %}{{ middle_count }} middle relay{% if middle_count > 1 %}s{% endif %}{% if exit_count > 0 %} and {% endif %}{% endif %}{% if exit_count > 0 %}{{ exit_count }} exit relay{% if exit_count > 1 %}s{% endif %}{% endif %}.{% endblock %} diff --git a/tor-metrics/templates/country.html b/tor-metrics/templates/country.html deleted file mode 100644 index ab55af3..0000000 --- a/tor-metrics/templates/country.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "relay-list.html" %} -{% set country_orig = relays.json['relay_subset'][0]['country_name']|escape %} -{% set country_abbr = relays.json['relay_subset'][0]['country']|escape %} -{% if country_orig in sp_countries %} - {% set country_name = 'The ' + country_orig %} -{% else %} - {% set country_name = country_orig %} -{% endif %} -{% block title %}Tor Relays :: {{ country_orig }}{% endblock %} -{% block header %}<a href="../../">Home</a> :: {{ country_name }}{% endblock %} -{% block description %}{{ country_name }} ({{ country_abbr }}) is responsible for ~{{ bandwidth }} MB/s of traffic, with {% if middle_count > 0 %}{{ middle_count }} middle relay{% if middle_count > 1 %}s{% endif %}{% if exit_count > 0 %} and {% endif %}{% endif %}{% if exit_count > 0 %}{{ exit_count }} exit relay{% if exit_count > 1 %}s{% endif %}{% endif %}.{% endblock %} diff --git a/tor-metrics/templates/family.html b/tor-metrics/templates/family.html deleted file mode 100644 index b4d88d8..0000000 --- a/tor-metrics/templates/family.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "relay-list.html" %} -{% block title %}Tor Relays :: Family {{ value|escape }}{% endblock %} -{% block header %}<a href="../../">Home</a> :: Family <code>{{ value|escape }}</code>{% endblock %} -{% block description %}Relays with effective family member <code>{{ value|escape }}</code> are responsible for ~{{ bandwidth }} MB/s of traffic, with {% if middle_count > 0 %}{{ middle_count }} middle relay{% if middle_count > 1 %}s{% endif %}{% if exit_count > 0 %} and {% endif %}{% endif %}{% if exit_count > 0 %}{{ exit_count }} exit relay{% if exit_count > 1 %}s{% endif %}{% endif %}.{% endblock %} diff --git a/tor-metrics/templates/first_seen.html b/tor-metrics/templates/first_seen.html deleted file mode 100644 index 9b40362..0000000 --- a/tor-metrics/templates/first_seen.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "relay-list.html" %} -{% block title %}Tor Relays :: {{ value }}{% endblock %} -{% block header %}<a href="../../">Home</a> :: {{ value }}{% endblock %} -{% block description %}Relays started on {{ value }} are responsible for ~{{ bandwidth }} MB/s of traffic, with {% if middle_count > 0 %}{{ middle_count }} middle relay{% if middle_count > 1 %}s{% endif %}{% if exit_count > 0 %} and {% endif %}{% endif %}{% if exit_count > 0 %}{{ exit_count }} exit relay{% if exit_count > 1 %}s{% endif %}{% endif %}.{% endblock %} diff --git a/tor-metrics/templates/flag.html b/tor-metrics/templates/flag.html deleted file mode 100644 index 875c494..0000000 --- a/tor-metrics/templates/flag.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "relay-list.html" %} -{% block title %}Tor Relays :: {{ value|escape }} Relays{% endblock %} -{% block header %}<a href="../../">Home</a> :: {{ value|escape }} Relays{% endblock %} -{% block description %}Relays with the {{ value }} flag are responsible for ~{{ bandwidth }} MB/s of traffic, with {% if middle_count > 0 %}{{ middle_count }} middle relay{% if middle_count > 1 %}s{% endif %}{% if exit_count > 0 %} and {% endif %}{% endif %}{% if exit_count > 0 %}{{ exit_count }} exit relay{% if exit_count > 1 %}s{% endif %}{% endif %}.{% endblock %} diff --git a/tor-metrics/templates/index.html b/tor-metrics/templates/index.html deleted file mode 100644 index 60f2ca7..0000000 --- a/tor-metrics/templates/index.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "relay-list.html" %} -{% block title %}Tor Relays{% endblock %} -{% block header %}Tor Metrics (<a href="http://d6amkx45augz4kskvjryv3bmmwyf7vw4k3uwxsh5egnibw2igl5aozqd.onion/">v3</a>, <a href="https://github.com/tempname1024/tor-metrics">git</a>) :: <a href="./misc/networks-by-bandwidth.html">Networks</a>, <a href="./misc/families-by-bandwidth.html">Families</a>{% endblock %} -{% block description %}Relay listings are statically generated every hour. Last fetch was at {{ relays.timestamp }}. Listing top 500 relays; <a href="misc/all.html">view full list</a>.{% endblock %} - diff --git a/tor-metrics/templates/misc-families.html b/tor-metrics/templates/misc-families.html deleted file mode 100644 index 7eb2de2..0000000 --- a/tor-metrics/templates/misc-families.html +++ /dev/null @@ -1,60 +0,0 @@ -{% extends "skeleton.html" %} -{% set sorted_by_label = sorted_by.split(',')[0].split('.')[1] %} -{% block title %}Tor Relays :: Families By {{ sorted_by_label|replace('_', ' ')|title }}{% endblock %} -{% block body %} -<h2><a href={{ path_prefix }}>Home</a> :: Families By {{ sorted_by_label|replace('_', ' ')|title }}</h2> -<p>The set of all relay families with > 1 effective members, sorted by {{ sorted_by_label|replace('_', ' ') }}. The first seen parameter is taken from the oldest relay in the family.</p> -<table class="table table-condensed"> - <tr> - <th>Family</th> - {% if sorted_by_label == 'bandwidth' %} - <th>Bandwidth</th> - {% else %} - <th><a href="families-by-bandwidth.html">Bandwidth</a></th> - {% endif %} - <th class="visible-md visible-lg">Contact</th> - {% if sorted_by_label == 'exit_count' %} - <th>Exit / <a href="families-by-middle-count.html">Middle</a></th> - {% elif sorted_by_label == 'middle_count' %} - <th><a href="families-by-exit-count.html">Exit</a> / Middle</th> - {% else %} - <th><a href="families-by-exit-count.html">Exit</a> / <a href="families-by-middle-count.html">Middle</a></th> - {% endif %} - {% if sorted_by_label == 'first_seen' %} - <th>First Seen</th> - {% else %} - <th><a href="families-by-first-seen.html">First Seen</a></th> - {% endif %} - </tr> - <tbody> - {% set processed = dict() %} - {% for k, v in relays.json['sorted']['family'].items()|sort(attribute=sorted_by, reverse=True) %} - {% if relays.json['relays'][v['relays'][0]]['fingerprint'] not in processed %} - <tr> - {% if v['bandwidth'] > 1000000 %} - {% set obs_bandwidth = '%s %s'|format((v['bandwidth'] / 1000000)|round(2, 'common'), 'MB/s') %} - {% else %} - {% set obs_bandwidth = '%s %s'|format((v['bandwidth'] / 1000)|round(2, 'common'), 'KB/s') %}{% endif %} - - <td><code><a href="{{ path_prefix}}family/{{ k|escape }}/">{{ k|escape }}</a></code></td> - - <td>{{ obs_bandwidth }}</td> - - {% if v['contact'] %} - <td class="visible-md visible-lg"><code><a href="{{ path_prefix }}contact/{{ v['contact']|hash }}/" title="{{ v['contact']|escape }}">{{ v['contact']|truncate(50)|escape }}<a></td></code> - {% else %} - <td>none</td>{% endif %} - - <td>{{ v['exit_count'] }} / {{ v['middle_count'] }}</td> - - <td><a href="{{ path_prefix }}first_seen/{{ v['first_seen'].split(' ', 1)[0]|escape }}">{{ v['first_seen'].split(' ', 1)[0]|escape }}</a></td> - - {% for r in v['relays'] %} - {% set _dummy = processed.update({relays.json['relay_subset'][r]['fingerprint']: None}) %} - {% endfor %} - </tr> - {% endif %} - {% endfor %} - </tbody> -</table> -{% endblock %} diff --git a/tor-metrics/templates/misc-networks.html b/tor-metrics/templates/misc-networks.html deleted file mode 100644 index 2eeabb1..0000000 --- a/tor-metrics/templates/misc-networks.html +++ /dev/null @@ -1,54 +0,0 @@ -{% extends "skeleton.html" %} -{% set sorted_by_label = sorted_by.split(',')[0].split('.')[1] %} -{% block title %}Tor Relays :: Networks By {{ sorted_by_label|replace('_', ' ')|title }}{% endblock %} -{% block body %} -<h2><a href={{ path_prefix }}>Home</a> :: Networks By {{ sorted_by_label|replace('_', ' ')|title }}</h2> -<p>The set of all ({{ relays.json['sorted']['as']|length }}) recognized networks running at least one relay sorted by {{ sorted_by_label|replace('_', ' ') }}. This data is onionoo-derived and might be out of date with respect to other sources.</p> -<table class="table table-condensed"> - <tr> - <th>AS Number</th> - <th>AS Name</th> - <th>Country</th> - {% if sorted_by_label == 'bandwidth' %} - <th>Bandwidth</th> - {% else %} - <th><a href="networks-by-bandwidth.html">Bandwidth</a></th> - {% endif %} - {% if sorted_by_label == 'exit_count' %} - <th>Exit / <a href="networks-by-middle-count.html">Middle</a></th> - {% elif sorted_by_label == 'middle_count' %} - <th><a href="networks-by-exit-count.html">Exit</a> / Middle</th> - {% else %} - <th><a href="networks-by-exit-count.html">Exit</a> / <a href="families-by-middle-count.html">Middle</a></th> - {% endif %} - </tr> - <tbody> - {% for k, v in relays.json['sorted']['as'].items()|sort(attribute=sorted_by, reverse=True) %} - <tr> - {% if v['bandwidth'] > 1000000 %} - {% set obs_bandwidth = '%s %s'|format((v['bandwidth'] / 1000000)|round(2, 'common'), 'MB/s') %} - {% else %} - {% set obs_bandwidth = '%s %s'|format((v['bandwidth'] / 1000)|round(2, 'common'), 'KB/s') %}{% endif %} - - <td><a href="{{ path_prefix}}as/{{ k|escape }}/">{{ k|escape }}</a></td> - - {% if v['as_name'] %} - <td title="{{ v['as_name']|escape }}"><a href="https://bgp.he.net/{{ k|escape }}">{{ v['as_name']|truncate(20)|escape }}</a></td> - {% else %} - <td>Unknown</td> - {% endif %} - - {% if v['country'] %} - <td><a href="{{ path_prefix }}country/{{ v['country']|escape }}/"><img src="{{ path_prefix }}static/images/cc/{{ v['country']|escape }}.png" title="{{ v['country_name']|escape }}"alt="{{ v['country_name']|escape }}"></a></td> - {% else %} - <td>X</td> - {% endif %} - - <td>{{ obs_bandwidth }}</td> - - <td>{{ v['exit_count'] }} / {{ v['middle_count'] }}</td> - </tr> - {% endfor %} - </tbody> -</table> -{% endblock %} diff --git a/tor-metrics/templates/platform.html b/tor-metrics/templates/platform.html deleted file mode 100644 index b2832fd..0000000 --- a/tor-metrics/templates/platform.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "relay-list.html" %} -{% set platform = relays.json['relay_subset'][0]['platform']|escape %} -{% block title %}Tor Relays :: {{ platform }}{% endblock %} -{% block header %}<a href="../../">Home</a> :: {{ platform }}{% endblock %} -{% block description %}{{ platform }} systems are responsible for ~{{ bandwidth }} MB/s of traffic, with {% if middle_count > 0 %}{{ middle_count }} middle relay{% if middle_count > 1 %}s{% endif %}{% if exit_count > 0 %} and {% endif %}{% endif %}{% if exit_count > 0 %}{{ exit_count }} exit relay{% if exit_count > 1 %}s{% endif %}{% endif %}.{% endblock %} diff --git a/tor-metrics/templates/relay-info.html b/tor-metrics/templates/relay-info.html deleted file mode 100644 index f46d585..0000000 --- a/tor-metrics/templates/relay-info.html +++ /dev/null @@ -1,176 +0,0 @@ -{% extends "skeleton.html" %} -{% block title %}Tor Relays :: {{ relay['nickname'] }}{% endblock %} -{% block body %} -<div id="content"> -<h2><a href="{{ path_prefix }}">Home</a> :: Relay "{{ relay['nickname'] }}"</h2> -<div class="row"> - <div class="col-md-6"> - <dl> - <dt>Nickname</dt> - <dd>{{ relay['nickname']|escape }}</dd> - - <dt>OR Address</dt> - <dd><pre class="pre-scrollable">{% for address in relay['or_addresses'] -%} - {{ address }} - {% endfor -%} - </pre></dd> - - <dt>Contact</dt> - {% if relay['contact'] %} - <dd><a href="{{ path_prefix }}contact/{{ relay['contact']|hash }}">{{ relay['contact']|escape }}</a></dd> - {% else %} - <dd><a href="{{ path_prefix }}contact/{{ ''|hash }}">none</a></dd> - {% endif %} - - <dt>Dir Address</dt> - {% if relay['dir_address'] %} - <dd><a href="http://{{ relay['dir_address']|escape }}">{{ relay['dir_address']|escape }}</a></dd> - {% else %} - <dd>none</dd> - {% endif %} - - <dt>Exit Address</dt> - {% if relay['exit_address'] %} - <dd>{{ relay['exit_address']|escape }}</dd> - {% else %} - <dd>none</dd> - {% endif %} - - <dt>Observed Bandwidth</dt> - {% if relay['observed_bandwidth'] > 1000000 %} - {% set obs_bandwidth = '%s %s'|format((relay['observed_bandwidth'] / 1000000)|round(2, 'common'), 'MB/s') %} - {% else %} - {% set obs_bandwidth = '%s %s'|format((relay['observed_bandwidth'] / 1000)|round(2, 'common'), 'KB/s') %}{% endif %} - <dd>{{ obs_bandwidth }}</dd> - - <dt>IPv4 Exit Policy Summary</dt> - <dd> - {% if relay['exit_policy_summary'] -%} - {%- set v4_summary = relay['exit_policy_summary'].items() -%} - <pre class="pre-scrollable">{% for k, v in v4_summary -%} - {{ k|escape }}: {{ '\n ' + v|join('\n ')|escape }} - {% endfor -%} - </pre> - {% else -%} - <pre>none</pre> - {% endif -%} - </dd> - - <dt>IPv6 Exit Policy Summary</dt> - <dd> - {% if relay['exit_policy_v6_summary'] -%} - {%- set v6_summary = relay['exit_policy_v6_summary'].items() -%} - <pre class="pre-scrollable">{% for k, v in v6_summary -%} - {{ k|escape }}: {{ '\n ' + v|join('\n ')|escape }} - {% endfor -%} - </pre> - {% else -%} - <pre>none</pre> - {% endif -%} - </dd> - - <dt>Exit Policy</dt> - <dd><pre class="pre-scrollable">{% for policy in relay['exit_policy'] -%} - {{ policy|escape }} - {% endfor -%} - </pre></dd> - - {% if relay['effective_family']|length > 1 -%} - <dt>Effective Family Members (<a href="{{ path_prefix }}family/{{ relay['fingerprint']|escape }}">view</a>)</dt> - {% else %} - <dt>Effective Family Members</dt> - {% endif %} - <dd><pre class="pre-scrollable">{% for e_relay in relay['effective_family'] -%} - {% if relay['effective_family']|length > 1 -%} - <a href="{{ e_relay|escape }}.html">{{ e_relay|escape }}</a> - {% else -%} - {{ e_relay|escape }} - {% endif -%} - {% endfor -%} - </pre></dd> - - <dt>Alleged Family Members</dt> - <dd> - {% if relay['alleged_family'] %} - <pre class="pre-scrollable">{% for a_relay in relay['alleged_family'] -%} - {% if relay['alleged_family']|length > 1 -%} - <a href="{{ a_relay|escape }}.html">{{ a_relay|escape }}</a> - {% else -%} - {{ a_relay|escape }} - {% endif -%} - {% endfor %} - {% else -%} - <pre class="pre-scrollable">none - {% endif -%} - </pre></dd> - </dl> - </div> - <div class="col-md-6"> - <dl> - <dt>Fingerprint</dt> - <dd><pre>{{ relay['fingerprint']|escape }}</pre></dd> - - <dt>Flags</dt> - <dd> - {% for flag in relay['flags'] %} - {% if flag != 'StaleDesc' %} - <a href="{{ path_prefix }}flag/{{ flag.lower()|escape }}"><img src="{{ path_prefix}}static/images/flags/{{ flag.lower()|escape }}.png" title="{{ flag|escape }}" alt="{{ flag|escape }}"></a> {{ flag|escape }} - {% endif %} - {% endfor %} - </dd> - - <dt>Host Name</dt> - <dd> - {% if relay['verified_host_names'] -%} - <pre class="verified-hostname" title="verified hostname">{{ relay['verified_host_names']|join('\n')|escape }}</pre> - {% elif relay['unverified_host_names'] -%} - <pre class="unverified-hostname" title="unverified hostname">{{ relay['unverified_host_names']|join('\n')|escape }}</pre> - {% else -%} - <pre>none</pre> - {% endif -%} - - <dt>Country</dt> - <dd> - {% if relay['country'] -%} - <a href="{{ path_prefix }}country/{{ relay['country']|escape }}/"><img src="{{ path_prefix }}static/images/cc/{{ relay['country']|escape }}.png" title="{{ relay['country_name']|escape }}" alt="{{ relay['country_name']|escape }}"></a> {{ relay['country_name']|escape }} - {% else -%} - unknown - {% endif %} - </dd> - - <dt>AS Number</dt> - <dd> - {% if relay['as'] %} - <a href='{{ path_prefix }}as/{{ relay['as']|escape }}'>{{ relay['as']|escape }}</a> - {% else %} - unknown - {% endif %} - - <dt>AS Name</dt> - <dd> - {% if relay['as_name'] -%} - {{ relay['as_name']|escape }} (<a href='https://bgp.he.net/{{ relay['as']|escape }}'>BGP</a>) - {% else -%} - unknown - {% endif -%} - - <dt>First Seen</dt> - <dd><a href="{{ path_prefix }}first_seen/{{ relay['first_seen'].split(' ', 1)[0]|escape }}">{{ relay['first_seen']|escape }}</a></dd> - - <dt>Last Restarted</dt> - <dd>{{ relay['last_restarted']|escape }}</dd> - - <dt>Consensus Weight</dt> - <dd>{{ relay['consensus_weight_fraction']|escape }} ({{ relay['consensus_weight']|escape }})</dd> - - <dt>Platform</dt> - <dd> - <a href='{{ path_prefix}}platform/{{ relay['platform']|escape }}'>{{ - relay['platform'] }}</a> - </dd> - - </dl> - </div> -</div> -</div> -{% endblock %} diff --git a/tor-metrics/templates/relay-list.html b/tor-metrics/templates/relay-list.html deleted file mode 100644 index dca3d9a..0000000 --- a/tor-metrics/templates/relay-list.html +++ /dev/null @@ -1,97 +0,0 @@ -{% extends "skeleton.html" %} -{% block title %}Tor Relays{% endblock %} -{% block body %} -<h2>{% block header %}{% endblock %}</h2> -<p>{% block description %}{% endblock %}</p> -<table class="table table-condensed"> - <tr> - <th></th> - <th>Nickname</th> - <th></th> - <th>Bandwidth</th> - <th class="visible-md visible-lg">IP Address</th> - <th>AS Number</th> - <th>AS Name</th> - <th>Country</th> - <th>Platform</th> - <th>Flags</th> - <th class="visible-md visible-lg">First Seen</th> - </tr> - <tbody> - {% if is_index %}{% set relay_list = relays.json['relay_subset'][:500] %} - {% else %}{% set relay_list = relays.json['relay_subset'] %}{% endif %} - {% for relay in relay_list %} - <tr> - {% if relay['observed_bandwidth'] > 1000000 %} - {% set obs_bandwidth = '%s %s'|format((relay['observed_bandwidth'] / 1000000)|round(2, 'common'), 'MB/s') %} - {% else %} - {% set obs_bandwidth = '%s %s'|format((relay['observed_bandwidth'] / 1000)|round(2, 'common'), 'KB/s') %}{% endif %} - - {% if relay['running'] %} - <td><span class="circle circle-online" title="This relay is online"></span></td> - {% else %} - <td><span class="circle circle-offline" title="This relay is offline"></span></td> - {% endif %} - - {% if relay['effective_family']|length > 1 %} - <td title="{{ relay['nickname']|escape }}"><a href="{{ path_prefix }}relay/{{ relay['fingerprint']|escape }}.html">{{ relay['nickname']|truncate(10)|escape }}</a> (<a href="{{ path_prefix }}family/{{ relay['fingerprint']|escape }}/">{{ relay['effective_family']|length }}</a>)</td> - {% else %} - <td title="{{ relay['nickname']|escape }}"><a href="{{ path_prefix}}relay/{{ relay['fingerprint']|escape }}.html">{{ relay['nickname']|truncate(15)|escape }}</a></td> - {% endif %} - - {% if key != 'contact' %} - {% if relay['contact'] %} - <td><a href="{{ path_prefix }}contact/{{ relay['contact']|hash }}/" title="{{ relay['contact']|escape }}">✉</a></td> - {% else %} - <td title="none">✉</td> - {% endif %} - {% else %} - <td title="{{ relay['contact']|escape }}">✉</td> - {% endif %} - - <td>{{ obs_bandwidth }}</td> - - <td class="visible-md visible-lg"><a href="https://bgp.he.net/ip/{{ relay['or_addresses'][0].split(':', 1)[0]|escape }}">{{ relay['or_addresses'][0].split(':', 1)[0]|escape }}</a></td> - - {% if relay['as'] %}{% if key != 'as' %} - <td><a href="{{ path_prefix }}as/{{ relay['as']|escape }}/">{{ relay['as']|escape }}</a></td> - {% else %} - <td>{{ relay['as']|escape }}</td> - {% endif %} - {% else %} - <td>Unknown</td> - {% endif %} - - {% if relay['as_name'] %} - <td><a href="https://bgp.he.net/{{ relay['as']|escape }}" title="{{ relay['as_name']|escape }}">{{ relay['as_name']|escape|truncate(length=20) }}</a></td> - {% else %} - <td>Unknown</td> - {% endif %} - - {% if relay['country'] %}{% if key != 'country' %} - <td><a href="{{ path_prefix }}country/{{ relay['country']|escape }}/"><img src="{{ path_prefix }}static/images/cc/{{ relay['country']|escape }}.png" title="{{ relay['country_name']|escape }}" alt="{{ relay['country_name']|escape }}"></a></td> - {% else %} - <td><img src="{{ path_prefix }}static/images/cc/{{ relay['country']|escape }}.png" title="{{ relay['country_name']|escape }}" alt="{{ relay['country_name']|escape }}"></td> - {% endif %} - {% else %} - <td>X</td> - {% endif %} - - {% if key != 'platform' %} - <td><a href="{{ path_prefix }}platform/{{ relay['platform']|escape }}/">{{ relay['platform']|truncate(length=10)|escape }}</a></td> - {% else %} - <td>{{ relay['platform']|truncate(length=10)|escape }}</td> - {% endif %} - - <td>{% for flag in relay['flags'] %}{% if flag != 'StaleDesc' %}<a href="{{ path_prefix }}flag/{{ flag.lower()|escape }}"><img src="{{ path_prefix}}static/images/flags/{{ flag.lower()|escape }}.png" title="{{ flag|escape }}" alt="{{ flag|escape }}"></a> {% endif %}{% endfor %}</td> - - {% if key != 'first_seen' %} - <td class="visible-md visible-lg"><a href="{{ path_prefix }}first_seen/{{ relay['first_seen'].split(' ', 1)[0]|escape }}">{{ relay['first_seen'].split(' ', 1)[0]|escape }}</a></td> - {% else %} - <td class="visible-md visible-lg">{{ relay['first_seen'].split(' ', 1)[0]|escape }}</td> - {% endif %} - </tr> - {% endfor %} - </tbody> -</table> -{% endblock %} diff --git a/tor-metrics/templates/skeleton.html b/tor-metrics/templates/skeleton.html deleted file mode 100644 index d236def..0000000 --- a/tor-metrics/templates/skeleton.html +++ /dev/null @@ -1,56 +0,0 @@ -{% block head %} -<!DOCTYPE html> -<html lang="en"> -<head> - <title>{% block title %}{% endblock %}</title> - <meta name="description" content="Javascript-free Tor metrics generated from an hourly API request."> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="{{ path_prefix }}static/css/bootstrap.min.css"> - <!--source: metrics.torproject.org--> - <style> - .circle { - display: inline-block; - vertical-align: middle; - background: #999999; - width: 7px; - height: 7px; - -moz-border-radius: 50%; - -webkit-border-radius: 50%; - border-radius: 50%; - } - - .circle-online { - background: #25d918; - } - - .circle-offline { - background: #ff1515; - } - .verified-hostname { - color: #FE9F30; - } - .verified-hostname { - color: #68b030; - } - .unverified-hostname { - color: #FE9F30; - } - </style> -</head> -{% endblock %} -<body> -<div class="container"> -{% block body %} -{% endblock %} -</div> -</body> -{% block footer %} -<footer class="page-footer font-small"> -<div class="footer-copyright text-center text-muted"> -<p>generated by <a href="https://git.jordan.im/tor-metrics">tor-metrics</a> on -{{ relays.timestamp }}</p> -</div> -</footer> -</html> -{% endblock %} |