BGP-Ranking/website/web/templates/index.html

53 lines
1.8 KiB
HTML

{% extends "main.html" %}
{% block title %}BGP Ranking{% endblock %}
{% block content %}
<center>
<h1>BGP Ranking</h1></br></br>
</center>
<p>
<form style="width:300px; display:inline-block;" action="" method=post>
<input name="date" type="date" value="{{ date }}">
<input type="submit" value="Set date">
</form>
<form style="width:300px; display:inline-block;" action="" method=post>
<select name="ipversion">
<option value="v4" {% if ipversion == 'v4' %} selected="selected"{% endif %}>v4</option>
<option value="v6" {% if ipversion == 'v6' %} selected="selected"{% endif %}>v6</option>
</select>
<input type="submit" value="Set IP version">
</form>
<form style="width:300px; display:inline-block;" action="" method=post>
<select name="source">
<option value="" {% if not source %} selected="selected"{% endif %}>all</option>
{% for s in sources %}
<option value="{{ s }}" {% if source == s %} selected="selected"{% endif %}>{{ s }}</option>
{% endfor %}
</select>
<input type="submit" value="Set source">
</form>
<p>
<br/>
<form action="{{ url_for('asn_details') }}" method=post>
ASN to search: <input type=number name=asn>
<input type="submit" value="Search">
</form>
<br/>
<table class="table">
<tr>
<th>ASN</th>
<th>Rank</th>
<th>Description</th>
</tr>
{% for (asn, rank), description in ranks %}
<tr>
<td><a href="{{ url_for('asn_details', asn=asn) }}">{{ asn }}</a></td>
<td>{{ rank }}</td>
<td>{{ description }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}