- remove http only in login.html - extract PeeringManager into separate file - add "progress meter" for "used" to "available" peerings
35 lines
1.1 KiB
HTML
35 lines
1.1 KiB
HTML
{% extends 'base.html' %} {% block content %}
|
|
<div></div>
|
|
<div>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>NodeName</th>
|
|
<th>Country</th>
|
|
<th>City</th>
|
|
<th>peerings</th>
|
|
<th>Peer!</th>
|
|
</tr>
|
|
</thead>
|
|
{% for node in config["nodes"] %}
|
|
<tr>
|
|
<td>{{node}}</td>
|
|
<td>{{config["nodes"][node]["country"]}}</td>
|
|
<td>{{config["nodes"][node]["city"]}}</td>
|
|
<td>
|
|
{% set peerings_percentage =
|
|
(peerings.amount_by_node(node)/config['nodes'][node]['capacity']*100) %}
|
|
<div class="progress progress-bar" title="{{peerings.amount_by_node(node)}}/{{config['nodes'][node]['capacity']}}">
|
|
<div
|
|
class="progress progress-value"
|
|
style="width:'{{peerings_percentage}}px'; background-color: {% if (peerings_percentage<80) %}green{% elif (peerings_percentage < 90) %}orange{%else%}red{%endif%};"
|
|
>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td><a href="peerings/new?node={{node}}">peer</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|