bgpwtf/cccampix: draw the rest of the fucking owl
Change-Id: I49fd5906e69512e8f2d414f406edc0179522f225
diff --git a/bgpwtf/cccampix/frontend/templates/asn.html b/bgpwtf/cccampix/frontend/templates/asn.html
new file mode 100644
index 0000000..0eb3a61
--- /dev/null
+++ b/bgpwtf/cccampix/frontend/templates/asn.html
@@ -0,0 +1,106 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>AS{{ asn }} - CCCampIX Status Page</title>
+ <style type="text/css">
+ body {
+ background-color: #fff;
+ }
+ table, th, td {
+ background-color: #eee;
+ padding: 0.2em 0.4em 0.2em 0.4em;
+ }
+ .table th {
+ background-color: #c0c0c0;
+ }
+ .table {
+ background-color: #fff;
+ border-spacing: 0.2em;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>AS{{ asn }} at CCCamp IX</h1>
+ <h2>Autonomous System</h2>
+ <p>
+ <b>ASN</b>: {{ asn }}<br />
+ <b>Network name</b>: {{ details.peeringdb_info.name }}<br />
+ </p>
+ <h2>Checks</h2>
+ <p>
+ Checks are prerequisites that need to pass for the ASN to be considered as part of the exchange.
+ </p>
+ <p>
+ <table class="table">
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Status</th>
+ </tr>
+ {% for check in details.checks %}
+ <tr>
+ <td>{{ check_info.get(check.name)[0] }}</td>
+ <td>{{ check_info.get(check.name)[1] }}</td>
+ {% if check.status == 1 %}
+ <td style="background-color: lime">OK</td>
+ {% else %}
+ <td style="background-color: red">Failed: {{ check.msg }}</td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </table>
+ </p>
+ <h2>AS{{ asn }} Routers</h2>
+ <p>
+ These are the routers that we'll be trying to reach from our Route Servers.
+ </p>
+ <p>
+ <table class="table">
+ <tr>
+ <th>IPv6 Address</th>
+ <th>Legacy Address</th>
+ </tr>
+ {% for router in details.peeringdb_info.routers %}
+ <tr>
+ {% if router.ipv6 %}
+ <td>{{ router.ipv6 }}</td>
+ {% else %}
+ <td><i>none</i></td>
+ {% endif %}
+
+ {% if router.ipv4 %}
+ <td>{{ router.ipv4 }}</td>
+ {% else %}
+ <td><i>none</i></td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </table>
+ </p>
+ <h2>AS{{ asn }} Allowed Prefixes</h2>
+ <p>
+ Allowed prefixes pulled in from RPKI.
+ </p>
+ <p>
+ <table class="table">
+ <tr>
+ <th>Prefix</th>
+ <th>Max Length</th>
+ <th>Originating TA</th>
+ </tr>
+ {% for prefix in details.allowed_prefixes %}
+ <tr>
+ <td>{{ prefix.prefix }}</td>
+ <td>{{ prefix.max_length }}</td>
+ <td>{{ prefix.ta }}</td>
+ </tr>
+ {% else %}
+ <tr>
+ <td colspan="3"><i>no prefixes</i></td>
+ </tr>
+ {% endfor %}
+ </table>
+ </p>
+ </body>
+</html>