[tor-commits] [metrics-web/master] Link country name in details to search for country

karsten at torproject.org karsten at torproject.org
Mon Jul 9 13:36:16 UTC 2018


commit 194db287c1e985c0b58984a572fb9904465ba9dc
Author: Iain R. Learmonth <irl at fsfe.org>
Date:   Mon Jul 9 12:49:02 2018 +0100

    Link country name in details to search for country
    
    Additionally, a link to search for all exits in a country is displayed
    next to the country name.
    
    Fixes: #25861
---
 src/main/resources/web/templates/rs/details/router.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/resources/web/templates/rs/details/router.html b/src/main/resources/web/templates/rs/details/router.html
index c5ff77f..e1ffe37 100644
--- a/src/main/resources/web/templates/rs/details/router.html
+++ b/src/main/resources/web/templates/rs/details/router.html
@@ -148,7 +148,7 @@ should update it as soon as possible.</div>
     <dd><% if (relay.get('host_name')) { %><%= relay.get('host_name') %><% } else { %>No PTR record found<% } %></dd>
 
     <dt><span class="tip" title="Country as found in a GeoIP database by resolving the relay's first onion-routing address.">Country</span></dt>
-    <dd><% if (relay.get('country')) { %><img class="inline country" title="<%= relay.get('countryname') %>" alt="" src="/images/cc/<%= relay.get('country') %>.png"/> <%= relay.get('countryname') %><% } else { %>Unknown<% } %></dd>
+    <dd><% if (relay.get('country')) { %><img class="inline country" title="<%= relay.get('countryname') %>" alt="" src="/images/cc/<%= relay.get('country') %>.png"/> <a href="#search/country:<%= relay.get('country') %>"><%= relay.get('countryname') %></a> (<a href="#search/country:<%= relay.get('country') %>%20flag:exit"><img src="/images/flags/exit.png" title="All exits in <%= relay.get('countryname') %>"></a>)<% } else { %>Unknown<% } %></dd>
 
     <dt><span class="tip" title="Autonomous System Number">AS Number</span></dt>
     <dd><% if (relay.get('as_number') !== null) { %><a href="#search/as:<%= relay.get('as_number') %>"><%= _.escape(relay.get('as_number')) %></a><% } else { %>unknown<% }; %></dd>





More information about the tor-commits mailing list