From e17b6c0e69d638d6910b951835066a9fb30cc28e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 7 Jun 2018 16:52:05 +0200 Subject: [PATCH] new: Display all ASN descriptions --- website/web/__init__.py | 3 ++- website/web/templates/asn.html | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/website/web/__init__.py b/website/web/__init__.py index 8e3ee5b..8a87592 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -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']) diff --git a/website/web/templates/asn.html b/website/web/templates/asn.html index 18d0b19..3c65b55 100644 --- a/website/web/templates/asn.html +++ b/website/web/templates/asn.html @@ -17,6 +17,18 @@

Ranking - {{asn}}



{% include ['top_forms.html'] %} + + + + + + {% for timestamp in asn_descriptions.keys()|sort %} + + + + + {% endfor %} +
TimestampASN Description
{{ timestamp }}{{ asn_descriptions[timestamp] }}
Prefix