diff options
-rw-r--r-- | tor-metrics/relays.py | 1 | ||||
-rw-r--r-- | tor-metrics/templates/relay-info.html | 2 | ||||
-rw-r--r-- | tor-metrics/templates/relay-list.html | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/tor-metrics/relays.py b/tor-metrics/relays.py index c8b94ea..8b28f56 100644 --- a/tor-metrics/relays.py +++ b/tor-metrics/relays.py @@ -69,6 +69,7 @@ class Relays: ''' for relay in json_data['relays']: relay['platform'] = relay['platform'].split(' on ', 1)[1].split(' ')[0] + relay['platform'] = relay['platform'].split('/')[-1] # GNU/* return json_data def fix_missing_observed_bandwidth(self, json_data): diff --git a/tor-metrics/templates/relay-info.html b/tor-metrics/templates/relay-info.html index cfa974a..1b3df1a 100644 --- a/tor-metrics/templates/relay-info.html +++ b/tor-metrics/templates/relay-info.html @@ -114,7 +114,7 @@ <dd> {% for flag in relay['flags'] %} {% if flag != 'StaleDesc' %} - <img src="{{ path_prefix}}static/images/flags/{{ flag.lower()|escape }}.png" title="{{ flag|escape }}" alt="{{ flag|escape }}"> {{ flag|escape }} + <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> diff --git a/tor-metrics/templates/relay-list.html b/tor-metrics/templates/relay-list.html index 475ee75..024e658 100644 --- a/tor-metrics/templates/relay-list.html +++ b/tor-metrics/templates/relay-list.html @@ -54,9 +54,9 @@ <td>X</td>{% endif %} {% if deactivate != 'platform' %} - <td><a href="{{ path_prefix }}platform/{{ relay['platform']|escape }}/">{{ relay['platform']|escape }}</a></td> + <td><a href="{{ path_prefix }}platform/{{ relay['platform']|escape }}/">{{ relay['platform']|truncate(length=10)|escape }}</a></td> {% else %} - <td>{{ relay['platform']|escape }}</td>{% endif %} + <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> |