bgpwtf/cccampix: draw the rest of the fucking owl

Change-Id: I49fd5906e69512e8f2d414f406edc0179522f225
diff --git a/bgpwtf/cccampix/frontend/templates/index.html b/bgpwtf/cccampix/frontend/templates/index.html
new file mode 100644
index 0000000..00f0522
--- /dev/null
+++ b/bgpwtf/cccampix/frontend/templates/index.html
@@ -0,0 +1,97 @@
+<!doctype html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <title>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>CCCamp IX Status</h1>
+        <p>
+            You can use this page to see how your CCCamp IX registration is progressing.
+        </p>
+        <h2>System Status</h2>
+        <p>
+            If any of the above processors are down, provisioning of new peers might be delayed.
+        </p>
+        <p>
+            <table class="table">
+                <tr>
+                    <th>Processor</th>
+                    <th>Status</th>
+                    <th>Last Run</th>
+                    <th>Next Run</th>
+                </tr>
+                {% for processor in processors %}
+                <tr>
+                    <td>{{ processor.name }}</td>
+                    {% if processor.status == 1 %}
+                    <td style="background-color: lime;">OK</td>
+                    {% else %}
+                    <td style="background-color: red;">ERROR</td>
+                    {% endif %}
+                    <td>{{ (processor.last_run | from_nano).humanize() }}</td>
+                    <td>{{ (processor.next_run | from_nano).humanize() }}</td>
+                </tr>
+                {% endfor %}
+            </table>
+        </p>
+        <h2>Participating Peers</h2>
+        <p>
+            If you don't see your ASN here, means you didn't add yourself to out <a href="https://www.peeringdb.com/ix/2641">PeeringDB IX</a>.
+        </p>
+        <p>
+            If some checks are failing for your ASN, see the click on the ASN to navigate to its status page. There you can get more details about failure conditions, checks passed and how to configure a session to the route servers and upstream router.
+        <p>
+            <table class="table">
+                <tr>
+                    <th rowspan="2">ASN</th>
+                    <th rowspan="2">Name</th>
+                    <th rowspan="2">Checks Passed</th>
+                    <th colspan="2">Routers</th>
+                </tr>
+                <tr>
+                    <th>IPv6</th>
+                    <th>Legacy</th>
+                </tr>
+                {% for peer in peers %}
+                {% set rowspan = peer.peeringdb_info.routers | length %}
+                <tr>
+                    <td rowspan="{{rowspan}}"><a href="/asn/{{ peer.peeringdb_info.asn }}" name="as{{ peer.peeringdb_info.asn}}">{{ peer.peeringdb_info.asn }}</a></td>
+                    <td rowspan="{{rowspan}}">{{ peer.peeringdb_info.name }}</td>
+                    {% if peer.check_status == 1 %}
+                    <td rowspan="{{rowspan}}" style="background-color: lime;">OK</td>
+                    {% elif peer.check_status == 2  %}
+                    <td rowspan="{{rowspan}}" style="background-color: red;">FAILED</td>
+                    {% else %}
+                    <td rowspan="{{rowspan}}" style="background-color: orange;">UNKNOWN</td>
+                    {% endif %}
+                    <td>{{ peer.peeringdb_info.routers[0].ipv6 or "none" }}</td>
+                    <td>{{ peer.peeringdb_info.routers[0].ipv4 or "none" }}</td>
+                </tr>
+                {% for router in peer.peeringdb_info.routers[1:] %}
+                <tr>
+                    <td>{{ router.ipv6 or "none" }}</td>
+                    <td>{{ router.ipv4 or "none"  }}</td>
+                </tr>
+                {% endfor %}
+                {% endfor %}
+            </table>
+        </p>
+    </body>
+</html>