[tor-commits] [metrics-web/master] Add links to BridgeDB's info page.

karsten at torproject.org karsten at torproject.org
Thu Mar 19 08:08:59 UTC 2020


commit dfea0c84035f45725035238838cffd816ecbc81d
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Thu Mar 19 08:59:29 2020 +0100

    Add links to BridgeDB's info page.
    
    Remaining part of #33008.
---
 src/main/resources/web/templates/rs/details/bridge.html | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/main/resources/web/templates/rs/details/bridge.html b/src/main/resources/web/templates/rs/details/bridge.html
index a3a5958..019dadf 100644
--- a/src/main/resources/web/templates/rs/details/bridge.html
+++ b/src/main/resources/web/templates/rs/details/bridge.html
@@ -81,7 +81,19 @@
     <dd><%= relay.get('transports') ? relay.get('transports') : 'none' %></dd>
 
     <dt><span class="tip" title="BridgeDB distributor that this bridge is currently assigned to.">Bridge distribution mechanism</span></dt>
-    <dd><%= relay.get('bridgedb_distributor') ? relay.get('bridgedb_distributor') : 'none' %></dd>
+    <% if (!relay.get('bridgedb_distributor')) { %>
+    <dd><a href="https://bridges.torproject.org/info#none">None</a></dd>
+    <% } else if (relay.get('bridgedb_distributor') === 'unallocated') { %>
+    <dd><a href="https://bridges.torproject.org/info#reserved">Reserved</a></dd>
+    <% } else if (relay.get('bridgedb_distributor') === 'https') { %>
+    <dd><a href="https://bridges.torproject.org/info#https">HTTPS</a></dd>
+    <% } else if (relay.get('bridgedb_distributor') === 'email') { %>
+    <dd><a href="https://bridges.torproject.org/info#email">Email</a></dd>
+    <% } else if (relay.get('bridgedb_distributor') === 'moat') { %>
+    <dd><a href="https://bridges.torproject.org/info#moat">Moat</a></dd>
+    <% } else { %>
+    <dd><a href="https://bridges.torproject.org/info#<%= relay.get('bridgedb_distributor') %>"><%= relay.get('bridgedb_distributor') %></a></dd>
+    <% } %>
 
     </dl>
     </div>





More information about the tor-commits mailing list