diff --git a/website/web/__init__.py b/website/web/__init__.py index 86c038d..9fe6e88 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -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/', methods=['GET']) +def asn_details(asn): + q = Querying() + ranks = q.asn_details(asn) + return render_template('asn.html', asn=asn, ranks=ranks) diff --git a/website/web/templates/asn.html b/website/web/templates/asn.html new file mode 100644 index 0000000..db84262 --- /dev/null +++ b/website/web/templates/asn.html @@ -0,0 +1,21 @@ +{% extends "main.html" %} + +{% block title %}Ranking - {{ asn }}{% endblock %} + +{% block content %} +
+

Ranking - {{asn}}



+
+ + + + + + {% for prefix, rank in ranks %} + + + + + {% endfor %} +
PrefixRank
{{ prefix }}{{ rank }}
+{% endblock %} diff --git a/website/web/templates/index.html b/website/web/templates/index.html index 1194d98..e049cfa 100644 --- a/website/web/templates/index.html +++ b/website/web/templates/index.html @@ -13,8 +13,8 @@ {% for asn, rank in ranks %} - {{asn}} - {{rank}} + {{ asn }} + {{ rank }} {% endfor %}