aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2020-09-16 02:17:26 -0700
committerJordan <me@jordan.im>2020-09-16 02:17:26 -0700
commit49011d7240eef38d55d803c150cfdfdd1dc2ee11 (patch)
tree6bc9bd356972dc14f73185c2711435a1a19ffda9
parent83ee11ebae9d0900ab98bd6583396ce0ff5f8b40 (diff)
downloadallium-49011d7240eef38d55d803c150cfdfdd1dc2ee11.tar.gz
allium-49011d7240eef38d55d803c150cfdfdd1dc2ee11.zip
smaller, relay-prefixed running column, related to #1
-rw-r--r--tor-metrics/templates/relay-list.html14
-rw-r--r--tor-metrics/templates/skeleton.html8
2 files changed, 15 insertions, 7 deletions
diff --git a/tor-metrics/templates/relay-list.html b/tor-metrics/templates/relay-list.html
index 4ecadd6..ada0b2b 100644
--- a/tor-metrics/templates/relay-list.html
+++ b/tor-metrics/templates/relay-list.html
@@ -5,6 +5,7 @@
<p>{% block description %}{% endblock %}</p>
<table class="table table-condensed">
<tr>
+ <th></th>
<th>Nickname</th>
<th></th>
<th>Bandwidth</th>
@@ -14,7 +15,6 @@
<th>Country</th>
<th>Platform</th>
<th>Flags</th>
- <th class="visible-md visible-lg">Running</th>
<th class="visible-md visible-lg">First Seen</th>
</tr>
<tbody>
@@ -27,6 +27,12 @@
{% else %}
{% set obs_bandwidth = '%s %s'|format((relay['observed_bandwidth'] / 1000)|round(2, 'common'), 'KB/s') %}{% endif %}
+ {% if relay['running'] %}
+ <td class="relay-online" title="This relay is online">⚫</td>
+ {% else %}
+ <td class="relay-offline" title="This relay is offline">⚫</td>
+ {% endif %}
+
{% if key != 'family' and 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['effective_family'][0]|escape }}/">{{ relay['effective_family']|length }}</a>)</td>
{% else %}
@@ -79,12 +85,6 @@
<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 relay['running'] %}
- <td class="visible-md visible-lg"><font color="green">True</font></td>
- {% else %}
- <td class="visible-md visible-lg"><font color="red">False</font></td>
- {% endif %}
-
{% 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 %}
diff --git a/tor-metrics/templates/skeleton.html b/tor-metrics/templates/skeleton.html
index 2f67bb1..239d11d 100644
--- a/tor-metrics/templates/skeleton.html
+++ b/tor-metrics/templates/skeleton.html
@@ -7,6 +7,14 @@
<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">
+ <style>
+ .relay-online {
+ color: #25d918;
+ }
+ .relay-offline {
+ color: #ff1515;
+ }
+ </style>
</head>
{% endblock %}
<body>