Browse Source

Split node page up into sections

pm2
Luke Childs 9 years ago
parent
commit
92aebd5550
  1. 74
      views/node.html

74
views/node.html

@ -15,8 +15,8 @@
</section> </section>
</div> </div>
<section class="details"> <section class="overview">
<h3>Details</h3> <h3>Overview</h3>
<dl> <dl>
{% if node.nickname %} {% if node.nickname %}
<dt>Nickname</dt> <dt>Nickname</dt>
@ -30,16 +30,22 @@
<dt>Hashed Fingerprint</dt> <dt>Hashed Fingerprint</dt>
<dd>{{ node.hashed_fingerprint }}</dd> <dd>{{ node.hashed_fingerprint }}</dd>
{% endif %} {% endif %}
{% if node.advertised_bandwidth %}
<dt>Advertised Bandwidth</dt>
<dd>{{ node | bandwidth }}</dd>
{% endif %}
{% if node.flags.length %} {% if node.flags.length %}
<dt>Flags</dt> <dt>Flags</dt>
{% for flag in node.flags %} {% for flag in node.flags %}
<dd>{{ flag }}</dd> <dd>{{ flag }}</dd>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if node.country_name %} </dl>
<dt>Country</dt> </section>
<dd>{{ node.country_name }}</dd>
{% endif %} <section class="config">
<h3>Config</h3>
<dl>
{% if node.or_addresses.length %} {% if node.or_addresses.length %}
<dt>Or Addresses</dt> <dt>Or Addresses</dt>
{% for address in node.or_addresses %} {% for address in node.or_addresses %}
@ -50,49 +56,55 @@
<dt>Dir Address</dt> <dt>Dir Address</dt>
<dd>{{ node.dir_address }}</dd> <dd>{{ node.dir_address }}</dd>
{% endif %} {% endif %}
{% if node.as_number %}
<dt>AS Number</dt>
<dd>{{ node.as_number }}</dd>
{% endif %}
{% if node.as_name %}
<dt>AS Name</dt>
<dd>{{ node.as_name }}</dd>
{% endif %}
{% if node.consensus_weight %} {% if node.consensus_weight %}
<dt>Consensus Weight</dt> <dt>Consensus Weight</dt>
<dd>{{ node.consensus_weight }}</dd> <dd>{{ node.consensus_weight }}</dd>
{% endif %} {% endif %}
{% if node.transports.length %}
<dt>Transport Protocols</dt>
{% for transportProtocol in node.transports %}
<dd>{{ transportProtocol }}</dd>
{% endfor %}
{% endif %}
{% if node.exit_policy.length %}
<dt>Exit Policy</dt>
{% for rule in node.exit_policy %}
<dd>{{ rule }}</dd>
{% endfor %}
{% endif %}
{% if node.host_name %} {% if node.host_name %}
<dt>Hostname</dt> <dt>Hostname</dt>
<dd>{{ node.host_name }}</dd> <dd>{{ node.host_name }}</dd>
{% endif %} {% endif %}
{% if node.advertised_bandwidth %} {% if node.as_number %}
<dt>Advertised Bandwidth</dt> <dt>AS Number</dt>
<dd>{{ node | bandwidth }}</dd> <dd>{{ node.as_number }}</dd>
{% endif %} {% endif %}
{% if node.contact %} {% if node.as_name %}
<dt>Contact</dt> <dt>AS Name</dt>
<dd>{{ node.contact }}</dd> <dd>{{ node.as_name }}</dd>
{% endif %} {% endif %}
{% if node.platform %} {% if node.platform %}
<dt>Platform</dt> <dt>Platform</dt>
<dd>{{ node.platform }}</dd> <dd>{{ node.platform }}</dd>
{% endif %} {% endif %}
{% if node.transports.length %}
<dt>Transport Protocols</dt>
{% for transportProtocol in node.transports %}
<dd>{{ transportProtocol }}</dd>
{% endfor %}
{% endif %}
{% if node.type %} {% if node.type %}
<dt>Type</dt> <dt>Type</dt>
<dd>{{ node.type | title }}</dd> <dd>{{ node.type | title }}</dd>
{% endif %} {% endif %}
{% if node.exit_policy.length %} </dl>
<dt>Exit Policy</dt> </section>
{% for rule in node.exit_policy %}
<dd>{{ rule }}</dd> <section class="meta">
{% endfor %} <h3>Meta</h3>
<dl>
{% if node.contact %}
<dt>Contact</dt>
<dd>{{ node.contact }}</dd>
{% endif %}
{% if node.country_name %}
<dt>Country</dt>
<dd>{{ node.country_name }}</dd>
{% endif %} {% endif %}
</dl> </dl>
</section> </section>

Loading…
Cancel
Save