new: Display all ASN descriptions

pull/12/head
Raphaël Vinot 2018-06-07 16:52:05 +02:00
parent 3141fea0c5
commit e17b6c0e69
2 changed files with 14 additions and 1 deletions

View File

@ -64,6 +64,7 @@ def index():
def asn_details():
load_session()
q = Querying()
asn_descriptions = q.get_asn_descriptions(asn=session['asn'], all_descriptions=True)
sources = q.get_sources(date=session['date'])
ranks = q.asn_details(**session)
prefix = get_request_parameter('prefix')
@ -73,7 +74,7 @@ def asn_details():
prefix_ips.sort(key=lambda entry: len(entry[1]), reverse=True)
else:
prefix_ips = []
return render_template('asn.html', sources=sources, ranks=ranks, prefix_ips=prefix_ips, **session)
return render_template('asn.html', sources=sources, ranks=ranks, prefix_ips=prefix_ips, asn_descriptions=asn_descriptions, **session)
@app.route('/asn_history', methods=['GET', 'POST'])

View File

@ -17,6 +17,18 @@
<h1>Ranking - {{asn}}</h1></br></br>
</center>
{% include ['top_forms.html'] %}
<table class="table">
<tr>
<th>Timestamp</th>
<th>ASN Description</th>
</tr>
{% for timestamp in asn_descriptions.keys()|sort %}
<tr>
<td>{{ timestamp }}</td>
<td>{{ asn_descriptions[timestamp] }}</td>
</tr>
{% endfor %}
</table>
<table class="table">
<tr>
<th>Prefix</th>