new: ASN prefix page
parent
5ac57a9e1a
commit
bf2da80e96
|
@ -20,3 +20,10 @@ def index():
|
|||
q = Querying()
|
||||
ranks = q.asns_global_ranking(limit=-1)
|
||||
return render_template('index.html', ranks=ranks)
|
||||
|
||||
|
||||
@app.route('/asn/<int:asn>', methods=['GET'])
|
||||
def asn_details(asn):
|
||||
q = Querying()
|
||||
ranks = q.asn_details(asn)
|
||||
return render_template('asn.html', asn=asn, ranks=ranks)
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{% extends "main.html" %}
|
||||
|
||||
{% block title %}Ranking - {{ asn }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<center>
|
||||
<h1>Ranking - {{asn}}</h1></br></br>
|
||||
</center>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Prefix</th>
|
||||
<th>Rank</th>
|
||||
</tr>
|
||||
{% for prefix, rank in ranks %}
|
||||
<tr>
|
||||
<td>{{ prefix }}</td>
|
||||
<td>{{ rank }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
|
@ -13,8 +13,8 @@
|
|||
</tr>
|
||||
{% for asn, rank in ranks %}
|
||||
<tr>
|
||||
<td>{{asn}}</td>
|
||||
<td>{{rank}}</td>
|
||||
<td><a href="{{ url_for('asn', asn=asn) }}">{{ asn }}</a></td>
|
||||
<td>{{ rank }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue