[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [atlas/master] Split main details template into three templates
commit a5df04b8c8f78e0bc1dae654e4fb6bdd7e8d02d9
Author: Dmitry Eremin-Solenikov <dbaryshkov@xxxxxxxxx>
Date: Thu Jul 3 01:10:52 2014 +0400
Split main details template into three templates
Bridges have fewer fields compared to plain relays. It does not make
sense to have several if(!bridge) constructions in the main template, so
rename main.html to router.html and add a special bridge.html template.
As we are at it, split away error handling from template - it is now
done by a separate error.html.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@xxxxxxxxx>
---
js/views/details/main.js | 17 ++-
templates/details/bridge.html | 184 +++++++++++++++++++++++
templates/details/error.html | 4 +
templates/details/main.html | 323 -----------------------------------------
templates/details/router.html | 314 +++++++++++++++++++++++++++++++++++++++
5 files changed, 515 insertions(+), 327 deletions(-)
diff --git a/js/views/details/main.js b/js/views/details/main.js
index 1a0fbb2..ff8ce8d 100644
--- a/js/views/details/main.js
+++ b/js/views/details/main.js
@@ -6,13 +6,16 @@ define([
'backbone',
'models/relay',
'models/graph',
- 'text!templates/details/main.html',
+ 'text!templates/details/router.html',
+ 'text!templates/details/bridge.html',
+ 'text!templates/details/error.html',
'tooltip',
'popover',
'd3js',
'collapse',
'helpers'
-], function($, _, Backbone, relayModel, graphModel, mainDetailsTemplate){
+], function($, _, Backbone, relayModel, graphModel,
+ routerDetailsTemplate, bridgeDetailsTemplate, errorDetailsTemplate){
var mainDetailsView = Backbone.View.extend({
el: $("#content"),
initialize: function() {
@@ -175,7 +178,13 @@ define([
render: function() {
var data = {relay: this.model};
//console.log(data);
- var compiledTemplate = _.template(mainDetailsTemplate, data);
+ var compiledTemplate;
+ if (!this.model)
+ compiledTemplate = _.template(errorDetailsTemplate, data);
+ else if (this.model.get('is_bridge'))
+ compiledTemplate = _.template(bridgeDetailsTemplate, data);
+ else
+ compiledTemplate = _.template(routerDetailsTemplate, data);
document.title = "Atlas: " + this.model.get('nickname');
this.el.html(compiledTemplate);
var graph = this.graph;
@@ -230,7 +239,7 @@ define([
});
},
error: function() {
- var compiledTemplate = _.template(mainDetailsTemplate, {relay: null});
+ var compiledTemplate = _.template(errorDetailsTemplate, {relay: null});
$("#loading").hide();
this.el.html(compiledTemplate);
}
diff --git a/templates/details/bridge.html b/templates/details/bridge.html
new file mode 100644
index 0000000..c091363
--- /dev/null
+++ b/templates/details/bridge.html
@@ -0,0 +1,184 @@
+<h1>Details for: <span id="relay_name"><%= relay.get('nickname') %></span></h1>
+<!-- div class="subnav">
+ <ul class="nav nav-pills">
+ <li><a href="#general">General</a></li>
+ <li><a href="#graphs">Graphs</a></li>
+ <li><a href="#misc">Misc</a></li>
+ </ul>
+</div-->
+
+<h2>General <small>Overall information on the Tor bridge</small></h2>
+<hr/>
+
+<div class="row">
+ <div class="span4">
+ <h3>Configuration</h3>
+ <dl>
+ <dt><span class="tip" data-content="This is the nickname that the Tor bridge operator chose." data-original-title="Nickname">Nickname</span></dt>
+ <dd><%= _.escape(relay.get('nickname')) %></dd>
+
+ <dt><span class="tip" data-content="Ports (addresses are hidden) where the bridge listens for incoming connections from clients and other relays." data-original-title="Onion-routing addresses">OR Addresses</span></dt>
+ <dd><%= relay.get('or_addresses') %></dd>
+
+ <dt>
+ <span class="tip" data-content="Bandwidth that the bridge is willing and able to provide in bytes per second." data-original-title="Advertised bandwidth">Advertised Bandwidth</span>
+ </dt>
+ <dd><%= relay.get('bandwidth_hr') %></dd>
+ </dl>
+
+
+ </div>
+ <div class="span4">
+ <% if (relay.get('running') === true) { %>
+ <h3>Properties</h3>
+ <dl>
+ <% } else { %>
+ <h3>Last Known Properties</h3>
+ <dl>
+ <dt><span class="tip" data-content="Timestamp when the bridge was last seen in the consensus." data-original-title="Last seen">Last Seen</span></dt>
+ <dd><%= relay.get('last_seen') %></dd>
+ <% } %>
+
+ <dt><span class="tip" data-content="Hash of 20-byte unique identifier of the bridge." data-original-title="Hashed Fingerprint">Hashed Fingerprint</span></dt>
+ <dd><%= relay.get('fingerprint') %></dd>
+
+ <dt><span class="tip" data-content="Flags that the directory authorities assigned to this bridge." data-original-title="Bridge flags">Flags</span></dt>
+ <dd><% _.each(relay.get('flags'), function(flag) { %>
+ <img class="inline" src="img/flags/<%= flag[1] %>.png">
+ <span class="inline"><%= flag[0] %></span>
+ <% }); %>
+ </dd>
+
+ <dt><span class="tip" data-content="Date and time when the bridge was last (re-)started." data-original-title="Last restarted">Last Restarted</span></dt>
+ <dd><%= relay.get('last_restarted') %></dd>
+
+ <dt><span class="tip" data-content="What OS and Tor version the bridge is using" data-original-title="Platform">Platform</span></dt>
+ <dd><%= _.escape(relay.get('platform')) %></dd>
+
+ <dt><span class="tip" data-content="BridgeDB information assigned to the bridge." data-original-title="Pool Assignment">Pool Assignment</span></dt>
+ <dd><%= relay.get('pool_assignment') %></dd>
+
+ </dl>
+ </div>
+ <div class="span4">
+ <h3>Current Status</h3>
+ <dl>
+
+ <% if (relay.get('running') === false) { %>
+ <dt><span class="tip" data-content="The time since this bridge was last seen online." data-original-title="Downtime">Downtime</span></dt>
+ <dd><%= relay.get('downtime') %></dd>
+ <% } else {%>
+ <dt><span class="tip" data-content="The time since this bridge is online." data-original-title="Uptime">Uptime</span></dt>
+ <dd><%= relay.get('uptime_hrfull') %></dd>
+ <% } %>
+
+ <dt><span class="tip" data-content="Whether this bridge is listed in the current Tor directory or not." data-original-title="Running">Running</span></dt>
+ <dd><%= relay.get('running') %></dd>
+
+ </dl>
+ </div>
+</div>
+
+<div class="row">
+<h2>Graphs <small>Pretty graphs</small></h2>
+<hr/>
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="bw_days" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>3 Days graph</h5>
+ <a id="save_bw_days" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div><div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+
+ <div id="bw_week" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>1 Week graph</h5>
+ <a id="save_bw_week" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="bw_month" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>1 Month graph</h5>
+ <a id="save_bw_month" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div><div class="row">
+
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+
+ <div id="bw_months" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>3 Months graph</h5>
+ <a id="save_bw_months" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="bw_year" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>1 Year graph</h5>
+ <a id="save_bw_year" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+
+ </ul>
+</div><div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="bw_years" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+
+ <div class="caption">
+ <h5>5 Years graph</h5>
+ <a id="save_bw_years" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<!--
+<div class="row">
+<h2>Misc <small>unsorted other information</small></h2>
+<hr/>
+</div>
+-->
diff --git a/templates/details/error.html b/templates/details/error.html
new file mode 100644
index 0000000..537f9bd
--- /dev/null
+++ b/templates/details/error.html
@@ -0,0 +1,4 @@
+ <div class="alert">
+ <strong>No Results found!</strong><p>
+ No Tor relays or bridges matched your query :(</p>
+ </div>
diff --git a/templates/details/main.html b/templates/details/main.html
deleted file mode 100644
index 3d23a96..0000000
--- a/templates/details/main.html
+++ /dev/null
@@ -1,323 +0,0 @@
-<% if(relay == null) {%>
- <div class="alert">
- <strong>No Results found!</strong><p>
- No Tor relays matched your query :(</p>
- </div>
-<% } else { %>
-<h1>Details for: <span id="relay_name"><%= relay.get('nickname') %></span></h1>
-<!-- div class="subnav">
- <ul class="nav nav-pills">
- <li><a href="#general">General</a></li>
- <li><a href="#graphs">Graphs</a></li>
- <li><a href="#misc">Misc</a></li>
- </ul>
-</div-->
-
-<h2>General <small>Overall information on the Tor relay</small></h2>
-<hr/>
-
-<div class="row">
- <div class="span4">
- <h3>Configuration</h3>
- <dl>
- <dt><span class="tip" data-content="This is the nickname that the Tor relay operator chose." data-original-title="Nickname">Nickname</span></dt>
- <dd><%= _.escape(relay.get('nickname')) %></dd>
-
- <dt><span class="tip" data-content="Addresses and ports where the relay listens for incoming connections from clients and other relays." data-original-title="Onion-routing addresses">OR Addresses</span></dt>
- <dd><%= relay.get('or_addresses') %></dd>
-
- <dt><span class="tip" data-content="These are the contact details of the Tor relay operator" data-original-title="ContactInfo">Contact</span></dt>
- <dd><%= _.escape(relay.get('contact')) %></dd>
-
- <dt><span class="tip" data-content="Address and port where the relay listens for directory requests." data-original-title="Directory port">Dir Address</span></dt>
- <dd><%= relay.get('dir_address') %></dd>
-
- <dt>
- <span class="tip" data-content="Bandwidth that the relay is willing and able to provide in bytes per second." data-original-title="Advertised bandwidth">Advertised Bandwidth</span>
- </dt>
- <dd><span class="tip" data-content="Bandwidth rate: <%= relay.get('bandwidthr') %><br>Bandwidth burst: <%= relay.get('bandwidthb') %><br>Observed bandwidth: <%= relay.get('obandwidth') %>" data-original-title="Bandwidth values"><%= relay.get('bandwidth_hr') %></span></dd>
- <dt><span class="tip" data-content="Port summary of IPv4 exit connections that the relay is going to accept or reject." data-original-title="IPv4 exit policy summary">IPv4 Exit Policy Summary</span></dt>
- <dd>
- <% if ('accept' in relay.get('exit_policy_summary')) { %>
- <pre class="pre-scrollable">accept<% _.each(relay.get('exit_policy_summary')['accept'],
- function(ports) { %><br> <%= $.trim(ports) %><% });} %></pre>
- <% if ('reject' in relay.get('exit_policy_summary')) { %>
- <pre class="pre-scrollable">reject<% _.each(relay.get('exit_policy_summary')['reject'],
- function(ports) { %><br> <%= $.trim(ports) %><% });} %></pre>
- </dd>
- <dt><span class="tip" data-content="Port summary of IPv6 exit connections that the relay is going to accept or reject." data-original-title="IPv6 exit policy summary">IPv6 Exit Policy Summary</span></dt>
- <dd>
- <% if (relay.get('exit_policy_v6_summary') && ('accept' in relay.get('exit_policy_v6_summary'))) { %>
- <pre class="pre-scrollable">accept<% _.each(relay.get('exit_policy_v6_summary')['accept'],
- function(ports) { %><br> <%= $.trim(ports) %><% });} %></pre>
- <% if (relay.get('exit_policy_v6_summary') && ('reject' in relay.get('exit_policy_v6_summary'))) { %>
- <pre class="pre-scrollable">reject<% _.each(relay.get('exit_policy_v6_summary')['reject'],
- function(ports) { %><br> <%= $.trim(ports) %><% });} %></pre>
- </dd>
- <dt><span class="tip" data-content="Policy of exit connections that the relay is going to accept or reject." data-original-title="Exit policy">Exit Policy</span></dt>
- <dd>
- <pre class="pre-scrollable"><% _.each(relay.get('exit_policy'), function(line) { %>
-<%= $.trim(line) %><% }); %></pre>
- </dd>
- </dl>
-
-
- </div>
- <div class="span4">
- <% if (relay.get('running') === true) { %>
- <h3>Properties</h3>
- <dl>
- <% } else { %>
- <h3>Last Known Properties</h3>
- <dl>
- <dt><span class="tip" data-content="Timestamp when the relay was last seen in the consensus." data-original-title="Last seen">Last Seen</span></dt>
- <dd><%= relay.get('last_seen') %></dd>
- <% } %>
-
- <dt><span class="tip" data-content="20-byte unique identifier of the relay." data-original-title="Fingerprint">Fingerprint</span></dt>
- <dd><%= relay.get('fingerprint') %></dd>
-
- <dt><span class="tip" data-content="Flags that the directory authorities assigned to this relay." data-original-title="Relay flags">Flags</span></dt>
- <dd><% _.each(relay.get('flags'), function(flag) { %>
- <img class="inline" src="img/flags/<%= flag[1] %>.png">
- <span class="inline"><%= flag[0] %></span>
- <% }); %>
- </dd>
-
- <dt><span class="tip" data-content="Country as found in a GeoIP database by resolving the relay's first onion-routing address." data-original-title="Country">Country</span></dt>
- <dd><img class="inline country" title="<%= relay.get('countryname') %>" src="img/cc/<%= relay.get('country') %>.png"/> <%= relay.get('countryname') %></dd>
-
- <dt><span class="tip" data-content="Autonomous System Number" data-original-title="AS Number">AS Number</span></dt>
- <dd><%= _.escape(relay.get('as_no')) %></dd>
-
- <dt><span class="tip" data-content="Autonomous System Name" data-original-title="AS Name">AS Name</span></dt>
- <dd><%= _.escape(relay.get('as_name')) %></dd>
-
- <dt><span class="tip" data-content="Date and time when the relay was last (re-)started." data-original-title="Last restarted">Last Restarted</span></dt>
- <dd><%= relay.get('last_restarted') %></dd>
-
- <dt><span class"tip" data-content="Other family members of this relay." data-original-title="Family Members">Family Members</span></dt>
- <dd><pre><% _.each(relay.get('family'), function(member) { %><% var valid = member.match(RegExp("^\$[A-F0-9]{40}$")); %>
-<% if (valid) { %><a href="#details/<%= member.replace('$', '') %>"><% } %><%= member %><% if (valid) { %></a><% }}); %></pre></dd>
-
- <dt><span class="tip" data-content="Date and time when the relay last published a descriptor to the directory authorities." data-original-title="Descriptor published">Descriptor Published</span></dt>
- <dd><%= relay.get('desc_published') %></dd>
-
- <dt><span class="tip" data-content="What OS and Tor version the relay is using" data-original-title="Platform">Platform</span></dt>
- <dd><%= _.escape(relay.get('platform')) %></dd>
-
- <dt><span class="tip" data-content="Weight assigned to this relay by the directory authorities that clients use in their path selection algorithm. The unit is arbitrary; currently it's kilobytes per second, but that might change in the future." data-original-title="Consensus Weight">Consensus Weight</span></dt>
- <dd><%= relay.get('consensus_weight') %></dd>
-
- </dl>
- </div>
- <div class="span4">
- <h3>Current Status</h3>
- <dl>
-
- <% if (relay.get('running') === false) { %>
- <dt><span class="tip" data-content="The time since this relay was last seen online." data-original-title="Downtime">Downtime</span></dt>
- <dd><%= relay.get('downtime') %></dd>
- <% } else {%>
- <dt><span class="tip" data-content="The time since this relay is online." data-original-title="Uptime">Uptime</span></dt>
- <dd><%= relay.get('uptime_hrfull') %></dd>
- <% } %>
-
- <dt><span class="tip" data-content="Whether this relay is listed in the current Tor directory or not." data-original-title="Running">Running</span></dt>
- <dd><%= relay.get('running') %></dd>
-
- </dl>
- </div>
-</div>
-
-<div class="row">
-<h2>Graphs <small>Pretty graphs</small></h2>
-<hr/>
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
- <div id="bw_days" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
- <div class="caption">
- <h5>3 Days graph</h5>
- <a id="save_bw_days" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div><div class="row">
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
-
- <div id="bw_week" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
- <div class="caption">
- <h5>1 Week graph</h5>
- <a id="save_bw_week" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div>
-
-<div class="row">
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
- <div id="bw_month" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
- <div class="caption">
- <h5>1 Month graph</h5>
- <a id="save_bw_month" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div><div class="row">
-
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
-
- <div id="bw_months" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
- <div class="caption">
- <h5>3 Months graph</h5>
- <a id="save_bw_months" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div>
-
-<div class="row">
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
- <div id="bw_year" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
- <div class="caption">
- <h5>1 Year graph</h5>
- <a id="save_bw_year" href="">Save Graph</a>
- </div>
- </div>
- </li>
-
- </ul>
-</div><div class="row">
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
- <div id="bw_years" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
-
- <div class="caption">
- <h5>5 Years graph</h5>
- <a id="save_bw_years" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div>
-
-<div class="row">
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
- <div id="weights_week" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
-
- <div class="caption">
- <h5>1 Week graph</h5>
- <a id="save_weights_week" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div>
-
-<div class="row">
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
- <div id="weights_month" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
-
- <div class="caption">
- <h5>1 Month graph</h5>
- <a id="save_weights_month" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div>
-
-<div class="row">
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
- <div id="weights_months" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
-
- <div class="caption">
- <h5>3 Months graph</h5>
- <a id="save_weights_months" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div>
-
-<div class="row">
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
- <div id="weights_year" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
-
- <div class="caption">
- <h5>1 Year graph</h5>
- <a id="save_weights_year" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div>
-
-<div class="row">
- <ul class="thumbnails">
- <li class="span8">
- <div class="thumbnail">
- <div id="weights_years" class="graph">
- <img src="img/no-data-available.png" alt="">
- </div>
-
- <div class="caption">
- <h5>5 Years graph</h5>
- <a id="save_weights_years" href="">Save Graph</a>
- </div>
- </div>
- </li>
- </ul>
-</div>
-
-<!--
-<div class="row">
-<h2>Misc <small>unsorted other information</small></h2>
-<hr/>
-</div>
--->
-<% } %>
-
-
diff --git a/templates/details/router.html b/templates/details/router.html
new file mode 100644
index 0000000..8802255
--- /dev/null
+++ b/templates/details/router.html
@@ -0,0 +1,314 @@
+<h1>Details for: <span id="relay_name"><%= relay.get('nickname') %></span></h1>
+<!-- div class="subnav">
+ <ul class="nav nav-pills">
+ <li><a href="#general">General</a></li>
+ <li><a href="#graphs">Graphs</a></li>
+ <li><a href="#misc">Misc</a></li>
+ </ul>
+</div-->
+
+<h2>General <small>Overall information on the Tor relay</small></h2>
+<hr/>
+
+<div class="row">
+ <div class="span4">
+ <h3>Configuration</h3>
+ <dl>
+ <dt><span class="tip" data-content="This is the nickname that the Tor relay operator chose." data-original-title="Nickname">Nickname</span></dt>
+ <dd><%= _.escape(relay.get('nickname')) %></dd>
+
+ <dt><span class="tip" data-content="Addresses and ports where the relay listens for incoming connections from clients and other relays." data-original-title="Onion-routing addresses">OR Addresses</span></dt>
+ <dd><%= relay.get('or_addresses') %></dd>
+
+ <dt><span class="tip" data-content="These are the contact details of the Tor relay operator" data-original-title="ContactInfo">Contact</span></dt>
+ <dd><%= _.escape(relay.get('contact')) %></dd>
+
+ <dt><span class="tip" data-content="Address and port where the relay listens for directory requests." data-original-title="Directory port">Dir Address</span></dt>
+ <dd><%= relay.get('dir_address') %></dd>
+
+ <dt>
+ <span class="tip" data-content="Bandwidth that the relay is willing and able to provide in bytes per second." data-original-title="Advertised bandwidth">Advertised Bandwidth</span>
+ </dt>
+ <dd><span class="tip" data-content="Bandwidth rate: <%= relay.get('bandwidthr') %><br>Bandwidth burst: <%= relay.get('bandwidthb') %><br>Observed bandwidth: <%= relay.get('obandwidth') %>" data-original-title="Bandwidth values"><%= relay.get('bandwidth_hr') %></span></dd>
+ <dt><span class="tip" data-content="Port summary of IPv4 exit connections that the relay is going to accept or reject." data-original-title="IPv4 exit policy summary">IPv4 Exit Policy Summary</span></dt>
+ <dd>
+ <% if ('accept' in relay.get('exit_policy_summary')) { %>
+ <pre class="pre-scrollable">accept<% _.each(relay.get('exit_policy_summary')['accept'],
+ function(ports) { %><br> <%= $.trim(ports) %><% });} %></pre>
+ <% if ('reject' in relay.get('exit_policy_summary')) { %>
+ <pre class="pre-scrollable">reject<% _.each(relay.get('exit_policy_summary')['reject'],
+ function(ports) { %><br> <%= $.trim(ports) %><% });} %></pre>
+ </dd>
+ <dt><span class="tip" data-content="Port summary of IPv6 exit connections that the relay is going to accept or reject." data-original-title="IPv6 exit policy summary">IPv6 Exit Policy Summary</span></dt>
+ <dd>
+ <% if (relay.get('exit_policy_v6_summary') && ('accept' in relay.get('exit_policy_v6_summary'))) { %>
+ <pre class="pre-scrollable">accept<% _.each(relay.get('exit_policy_v6_summary')['accept'],
+ function(ports) { %><br> <%= $.trim(ports) %><% });} %></pre>
+ <% if (relay.get('exit_policy_v6_summary') && ('reject' in relay.get('exit_policy_v6_summary'))) { %>
+ <pre class="pre-scrollable">reject<% _.each(relay.get('exit_policy_v6_summary')['reject'],
+ function(ports) { %><br> <%= $.trim(ports) %><% });} %></pre>
+ </dd>
+ <dt><span class="tip" data-content="Policy of exit connections that the relay is going to accept or reject." data-original-title="Exit policy">Exit Policy</span></dt>
+ <dd>
+ <pre class="pre-scrollable"><% _.each(relay.get('exit_policy'), function(line) { %>
+<%= $.trim(line) %><% }); %></pre>
+ </dd>
+ </dl>
+
+
+ </div>
+ <div class="span4">
+ <% if (relay.get('running') === true) { %>
+ <h3>Properties</h3>
+ <dl>
+ <% } else { %>
+ <h3>Last Known Properties</h3>
+ <dl>
+ <dt><span class="tip" data-content="Timestamp when the relay was last seen in the consensus." data-original-title="Last seen">Last Seen</span></dt>
+ <dd><%= relay.get('last_seen') %></dd>
+ <% } %>
+
+ <dt><span class="tip" data-content="20-byte unique identifier of the relay." data-original-title="Fingerprint">Fingerprint</span></dt>
+ <dd><%= relay.get('fingerprint') %></dd>
+
+ <dt><span class="tip" data-content="Flags that the directory authorities assigned to this relay." data-original-title="Relay flags">Flags</span></dt>
+ <dd><% _.each(relay.get('flags'), function(flag) { %>
+ <img class="inline" src="img/flags/<%= flag[1] %>.png">
+ <span class="inline"><%= flag[0] %></span>
+ <% }); %>
+ </dd>
+
+ <dt><span class="tip" data-content="Country as found in a GeoIP database by resolving the relay's first onion-routing address." data-original-title="Country">Country</span></dt>
+ <dd><img class="inline country" title="<%= relay.get('countryname') %>" src="img/cc/<%= relay.get('country') %>.png"/> <%= relay.get('countryname') %></dd>
+
+ <dt><span class="tip" data-content="Autonomous System Number" data-original-title="AS Number">AS Number</span></dt>
+ <dd><%= _.escape(relay.get('as_no')) %></dd>
+
+ <dt><span class="tip" data-content="Autonomous System Name" data-original-title="AS Name">AS Name</span></dt>
+ <dd><%= _.escape(relay.get('as_name')) %></dd>
+
+ <dt><span class="tip" data-content="Date and time when the relay was last (re-)started." data-original-title="Last restarted">Last Restarted</span></dt>
+ <dd><%= relay.get('last_restarted') %></dd>
+
+ <dt><span class"tip" data-content="Other family members of this relay." data-original-title="Family Members">Family Members</span></dt>
+ <dd><pre><% _.each(relay.get('family'), function(member) { %><% var valid = member.match(RegExp("^\$[A-F0-9]{40}$")); %>
+<% if (valid) { %><a href="#details/<%= member.replace('$', '') %>"><% } %><%= member %><% if (valid) { %></a><% }}); %></pre></dd>
+
+ <dt><span class="tip" data-content="Date and time when the relay last published a descriptor to the directory authorities." data-original-title="Descriptor published">Descriptor Published</span></dt>
+ <dd><%= relay.get('desc_published') %></dd>
+
+ <dt><span class="tip" data-content="What OS and Tor version the relay is using" data-original-title="Platform">Platform</span></dt>
+ <dd><%= _.escape(relay.get('platform')) %></dd>
+
+ <dt><span class="tip" data-content="Weight assigned to this relay by the directory authorities that clients use in their path selection algorithm. The unit is arbitrary; currently it's kilobytes per second, but that might change in the future." data-original-title="Consensus Weight">Consensus Weight</span></dt>
+ <dd><%= relay.get('consensus_weight') %></dd>
+
+ </dl>
+ </div>
+ <div class="span4">
+ <h3>Current Status</h3>
+ <dl>
+
+ <% if (relay.get('running') === false) { %>
+ <dt><span class="tip" data-content="The time since this relay was last seen online." data-original-title="Downtime">Downtime</span></dt>
+ <dd><%= relay.get('downtime') %></dd>
+ <% } else {%>
+ <dt><span class="tip" data-content="The time since this relay is online." data-original-title="Uptime">Uptime</span></dt>
+ <dd><%= relay.get('uptime_hrfull') %></dd>
+ <% } %>
+
+ <dt><span class="tip" data-content="Whether this relay is listed in the current Tor directory or not." data-original-title="Running">Running</span></dt>
+ <dd><%= relay.get('running') %></dd>
+
+ </dl>
+ </div>
+</div>
+
+<div class="row">
+<h2>Graphs <small>Pretty graphs</small></h2>
+<hr/>
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="bw_days" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>3 Days graph</h5>
+ <a id="save_bw_days" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div><div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+
+ <div id="bw_week" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>1 Week graph</h5>
+ <a id="save_bw_week" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="bw_month" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>1 Month graph</h5>
+ <a id="save_bw_month" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div><div class="row">
+
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+
+ <div id="bw_months" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>3 Months graph</h5>
+ <a id="save_bw_months" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="bw_year" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+ <div class="caption">
+ <h5>1 Year graph</h5>
+ <a id="save_bw_year" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+
+ </ul>
+</div><div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="bw_years" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+
+ <div class="caption">
+ <h5>5 Years graph</h5>
+ <a id="save_bw_years" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="weights_week" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+
+ <div class="caption">
+ <h5>1 Week graph</h5>
+ <a id="save_weights_week" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="weights_month" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+
+ <div class="caption">
+ <h5>1 Month graph</h5>
+ <a id="save_weights_month" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="weights_months" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+
+ <div class="caption">
+ <h5>3 Months graph</h5>
+ <a id="save_weights_months" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="weights_year" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+
+ <div class="caption">
+ <h5>1 Year graph</h5>
+ <a id="save_weights_year" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<div class="row">
+ <ul class="thumbnails">
+ <li class="span8">
+ <div class="thumbnail">
+ <div id="weights_years" class="graph">
+ <img src="img/no-data-available.png" alt="">
+ </div>
+
+ <div class="caption">
+ <h5>5 Years graph</h5>
+ <a id="save_weights_years" href="">Save Graph</a>
+ </div>
+ </div>
+ </li>
+ </ul>
+</div>
+
+<!--
+<div class="row">
+<h2>Misc <small>unsorted other information</small></h2>
+<hr/>
+</div>
+-->
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits