[tor-commits] [atlas/master] Adds an unmeasured property (#22185)

irl at torproject.org irl at torproject.org
Tue Nov 14 15:20:35 UTC 2017


commit 743b56b69532a45a3d186f75555df9169719a11c
Author: Iain R. Learmonth <irl at fsfe.org>
Date:   Tue Nov 14 15:05:28 2017 +0000

    Adds an unmeasured property (#22185)
---
 img/properties/unmeasured_16x16.png | Bin 0 -> 181 bytes
 js/models/relay.js                  |   1 +
 templates/details/router.html       |   8 ++++++++
 templates/search/do.html            |   3 +++
 4 files changed, 12 insertions(+)

diff --git a/img/properties/unmeasured_16x16.png b/img/properties/unmeasured_16x16.png
new file mode 100644
index 0000000..fd14d9a
Binary files /dev/null and b/img/properties/unmeasured_16x16.png differ
diff --git a/js/models/relay.js b/js/models/relay.js
index c90ffe0..4e0db34 100644
--- a/js/models/relay.js
+++ b/js/models/relay.js
@@ -172,6 +172,7 @@ define([
                     relay.contact = relay.contact ? relay.contact : 'undefined';
                     relay.platform = relay.platform ? relay.platform : null;
                     relay.recommended_version = (typeof relay.recommended_version !== 'undefined') ? relay.recommended_version : null;
+                    relay.measured = (typeof relay.measured !== 'undefined') ? relay.measured : null;
                     relay.nickname = relay.nickname ? relay.nickname : "Unnamed";
                     relay.dir_address = relay.dir_address ? relay.dir_address : null;
                     relay.exit_policy = relay.exit_policy ? relay.exit_policy : null;
diff --git a/templates/details/router.html b/templates/details/router.html
index 17ebb16..668c1e9 100644
--- a/templates/details/router.html
+++ b/templates/details/router.html
@@ -117,6 +117,14 @@
             <span class="inline">Outdated Tor version</span>
         </span>
     <% } %>
+    <% if (relay.get('measured') === false) {
+        propertyCount++;
+        %>
+        <span class="tip flags" title="This relay has not been measured by at least 3 bandwidth authorities and so its consensus weight is currently capped. This is expected for new relays.">
+            <img class="inline" alt="" src="img/properties/unmeasured_16x16.png"/>
+            <span class="inline">Unmeasured</span>
+        </span>
+    <% } %>
     <%=propertyCount==0?'none':''%>
     </dd>
 
diff --git a/templates/search/do.html b/templates/search/do.html
index b37eccd..f6bf883 100644
--- a/templates/search/do.html
+++ b/templates/search/do.html
@@ -106,6 +106,9 @@
                 <img class="tip" src="img/properties/not_recommended_16x16.png" alt="Outdated Tor version" title="Outdated Tor version<br />This relay is running a Tor version that is not recommended by the directory authorities and may contain known issues."/>
                 <% } %>
             <% } %>
+           <% if (relay.get('measured') === false) { %>
+                <img class="tip" src="img/properties/unmeasured_16x16.png" alt="Unmeasured" title="Unmeasured<br />This relay has not been measured by at least 3 bandwidth authorities and so its consensus weight is currently capped. This is expected for new relays.">
+          <% } %>
             </td>
 			<td><%= relay.get('or_port') %></td>
 			<td><%= relay.get('dir_port') %></td>





More information about the tor-commits mailing list