aboutsummaryrefslogtreecommitdiff
path: root/portal-gui/rpkigui/templates/myrpki
diff options
context:
space:
mode:
Diffstat (limited to 'portal-gui/rpkigui/templates/myrpki')
-rw-r--r--portal-gui/rpkigui/templates/myrpki/add_conf.html44
-rw-r--r--portal-gui/rpkigui/templates/myrpki/cert_confirm_delete.html10
-rw-r--r--portal-gui/rpkigui/templates/myrpki/cert_detail.html12
-rw-r--r--portal-gui/rpkigui/templates/myrpki/cert_form.html13
-rw-r--r--portal-gui/rpkigui/templates/myrpki/cert_list.html14
-rw-r--r--portal-gui/rpkigui/templates/myrpki/conf_list.html34
-rw-r--r--portal-gui/rpkigui/templates/myrpki/dashboard.html55
-rw-r--r--portal-gui/rpkigui/templates/myrpki/parent_resource.html30
-rw-r--r--portal-gui/rpkigui/templates/myrpki/parent_view.html68
-rw-r--r--portal-gui/rpkigui/templates/myrpki/resource_view.html86
-rw-r--r--portal-gui/rpkigui/templates/myrpki/roaform.html26
-rw-r--r--portal-gui/rpkigui/templates/myrpki/xml_import.html40
12 files changed, 366 insertions, 66 deletions
diff --git a/portal-gui/rpkigui/templates/myrpki/add_conf.html b/portal-gui/rpkigui/templates/myrpki/add_conf.html
new file mode 100644
index 00000000..b0994138
--- /dev/null
+++ b/portal-gui/rpkigui/templates/myrpki/add_conf.html
@@ -0,0 +1,44 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Add Configuration</h1>
+<p>Please enter a unique handle for your RPKI instance.
+
+{% if errors %}
+<ul>
+{% for m in errors %}
+<li class="errmsg">{{ m }}
+{% endfor %}
+</ul>
+{% endif %}
+
+<form action="/myrpki/conf/add" method="post">
+<table>
+{{ form.as_table }}
+<tr><td><input type="submit" value="Submit" /></td></tr>
+</table>
+</form>
+
+{% endblock %}
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Add Configuration</h1>
+<p>Please enter a unique handle for your RPKI instance.
+
+{% if errors %}
+<ul>
+{% for m in errors %}
+<li class="errmsg">{{ m }}
+{% endfor %}
+</ul>
+{% endif %}
+
+<form action="/myrpki/conf/add" method="post">
+<table>
+{{ form.as_table }}
+<tr><td><input type="submit" value="Submit" /></td></tr>
+</table>
+</form>
+
+{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/cert_confirm_delete.html b/portal-gui/rpkigui/templates/myrpki/cert_confirm_delete.html
deleted file mode 100644
index 661f4cc0..00000000
--- a/portal-gui/rpkigui/templates/myrpki/cert_confirm_delete.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
-<h1>Confirm Delete Cert</h1>
-
-<p>You would like to delete the certificate named {{ object.name }}.
-<form action="" method="post">
-<input type="submit" value="Delete" />
-</form>
-{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/cert_detail.html b/portal-gui/rpkigui/templates/myrpki/cert_detail.html
deleted file mode 100644
index e9d11074..00000000
--- a/portal-gui/rpkigui/templates/myrpki/cert_detail.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
-<h1>Cert {{ cert.name }}</h1>
-
-<pre>
-{{ cert.data }}
-</pre>
-
-<p><a href="edit/">[edit]</a> | <a href="delete/">[delete]</a>
-
-{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/cert_form.html b/portal-gui/rpkigui/templates/myrpki/cert_form.html
deleted file mode 100644
index 2ff95fb0..00000000
--- a/portal-gui/rpkigui/templates/myrpki/cert_form.html
+++ /dev/null
@@ -1,13 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
-<h1>Add/Edit Cert</h1>
-
-<form action="" method="post">
-<table>
-{{ form }}
-</table>
-<input type="submit" value="Submit" />
-</form>
-
-{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/cert_list.html b/portal-gui/rpkigui/templates/myrpki/cert_list.html
deleted file mode 100644
index 882a1301..00000000
--- a/portal-gui/rpkigui/templates/myrpki/cert_list.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
-<h1>Certificates for {{ request.session.handle }}</h1>
-
-<p>
-<a href="add/">[add]</a>
-<p>
-<ul>
-{% for cert in cert_list %}
-<li><a href="{{ cert.id }}/">{{ cert.name }}</a>
-{% endfor %}
-</ul>
-{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/conf_list.html b/portal-gui/rpkigui/templates/myrpki/conf_list.html
new file mode 100644
index 00000000..827994f4
--- /dev/null
+++ b/portal-gui/rpkigui/templates/myrpki/conf_list.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Handle List</h1>
+<p>Please select a handle.
+
+<ul>
+{% for c in conf_list %}
+<li><a href="/myrpki/conf/select?handle={{ c.handle }}&next={{ next_url }}">{{ c.handle }}</a>
+{% endfor %}
+</ul>
+
+<!--
+<p><a href="/myrpki/conf/add?next={{ next_url }}">[create]</a>
+-->
+
+{% endblock %}
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Handle List</h1>
+<p>Please select a handle.
+
+<ul>
+{% for c in conf_list %}
+<li><a href="/myrpki/conf/select?handle={{ c.handle }}&next={{ next_url }}">{{ c.handle }}</a>
+{% endfor %}
+</ul>
+
+<!--
+<p><a href="/myrpki/conf/add?next={{ next_url }}">[create]</a>
+-->
+
+{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/dashboard.html b/portal-gui/rpkigui/templates/myrpki/dashboard.html
index aef2b6cd..12fee303 100644
--- a/portal-gui/rpkigui/templates/myrpki/dashboard.html
+++ b/portal-gui/rpkigui/templates/myrpki/dashboard.html
@@ -1,48 +1,54 @@
{% extends "base.html" %}
{% block content %}
+<p>Handle: {{ request.session.handle }}
+| <a href="/myrpki/conf/export">export</a>
+| <a href="/myrpki/conf/list">change</a>
+
<div style="border: inset">
<h1 style="text-align: center">Parents</h1>
-<a href="#">[add]</a>
<ul>
{% for parent in request.session.handle.parents.all %}
-<li>{{ parent.handle }} (knows me as {{ parent.my_handle }})
+<li><a href="{{ parent.get_absolute_url }}">{{ parent.handle }}</a>
{% if parent.asn.count or parent.address_range.count %}
<p>Accepted resources:
<ul>
{% for asn in parent.asn.all %}
-<li>{{ asn }}
+<li><a href="{{ asn.get_absolute_url }}">{{ asn }}</a>
{% endfor %}
{% for address in parent.address_range.all %}
-<li>{{ address }}
+<li><a href="{{ address.get_absolute_url }}">{{ address }}</a>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
+<a href="/myrpki/import/parent">[add]</a>
</div>
+
<span>
<div style="border: outset">
<h1 style="text-align: center">Children</h1>
-<a href="#">[add]</a>
<p>
<ul>
{% for child in request.session.handle.children.all %}
-<li>{{ child.handle }}
+<li><a href="/myrpki/child/{{ child.handle }}/">{{ child.handle }}</a>
{% if child.address_range.count or child.asn.count %}
<p>Delegated resources:
<ul>
{% for asn in child.asn.all %}
-<li>{{ asn }}
+<li><a href="{{ asn.get_absolute_url }}">{{ asn }}</a>
{% endfor %}
{% for address in child.address_range.all %}
-<li>{{ address }}
+<li><a href="{{ address.get_absolute_url}}">{{ address }}</a>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
+<a href="/myrpki/import/child">[add]</a>
</div>
+
<div style="border: outset">
<h1 style="text-align: center">My ROA [request]s</h1>
{% if request.session.handle.roas.count %}
@@ -51,8 +57,8 @@
<th>Prefix</th>
<th>ASN</th>
<th>Max Len</th>
-<th>Active</th>
<th>Comments</th>
+<th></th>
</tr>
{% for roa in request.session.handle.roas.all %}
{% for address_range in roa.prefix.all %}
@@ -60,8 +66,8 @@
<td>{{ address_range }}</td>
<td>{{ roa.asn }}</td>
<td>{{ roa.max_len }}</td>
-<td>{{ roa.active }}</td>
<td>{{ roa.comments }}</td>
+<td><a href="{{ roa.get_absolute_url }}">edit</a></td>
</tr>
{% endfor %}
{% endfor %}
@@ -70,17 +76,32 @@
<p>
-- none --
{% endif %}
+<p><a href="/myrpki/roa/">[add]</a>
</div>
+
<div style="border: outset">
-<h1 style="text-align: center">Un&lt;something&gt; Resources</h1>
+<h1 style="text-align: center">Unallocated Resources</h1>
+{% if asns or ars %}
<ul>
+ {% for asn in asns %}
+ <li><a href="{{ asn.get_absolute_url }}">{{ asn }}</a>
+ {% endfor %}
+ {% for addr in ars %}
+ <li><a href="{{ addr.get_absolute_url }}">{{ addr }}</a>
+ {% endfor %}
+{% else %}
+<p>-- none --
+{% endif %}
+
+ <!--
<li>Address range 172.17.2.0-172.17.255.255
- <a href="#">[subdivide]</a> |
- <a href="#">[give to child]</a> |
- <a href="#">[issue roa]</a>
-<li>ASN 1 <a href="#">[give to child]</a>
-<li>ASNs 3-100 <a href="#">[subdivide]</a> |
- <a href="#">[give to child]</a>
+ | <a href="#">subdivide</a> |
+ <a href="#">give to child</a> |
+ <a href="#">issue roa</a>
+<li>ASN 1 | <a href="#">give to child</a>
+<li>ASNs 3-100 | <a href="#">subdivide</a> |
+ <a href="#">give to child</a>
+ -->
</ul>
</div>
</span>
diff --git a/portal-gui/rpkigui/templates/myrpki/parent_resource.html b/portal-gui/rpkigui/templates/myrpki/parent_resource.html
new file mode 100644
index 00000000..b0b61a86
--- /dev/null
+++ b/portal-gui/rpkigui/templates/myrpki/parent_resource.html
@@ -0,0 +1,30 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+<p>Handle: <a href="/myrpki/">{{ request.session.handle }}</a>
+
+<h1>Add Resource Range</h1>
+<form action="{{ request.url }}" method="post">
+<table>
+{{ form.as_table }}
+</table>
+<input type="submit" value="Submit" />
+</form>
+
+{% endblock %}
+{% extends "base.html" %}
+
+{% block content %}
+
+<p>Handle: <a href="/myrpki/">{{ request.session.handle }}</a>
+
+<h1>Add Resource Range</h1>
+<form action="{{ request.url }}" method="post">
+<table>
+{{ form.as_table }}
+</table>
+<input type="submit" value="Submit" />
+</form>
+
+{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/parent_view.html b/portal-gui/rpkigui/templates/myrpki/parent_view.html
new file mode 100644
index 00000000..5da574a2
--- /dev/null
+++ b/portal-gui/rpkigui/templates/myrpki/parent_view.html
@@ -0,0 +1,68 @@
+{% extends "base.html" %}
+
+{% block content %}
+<p>Handle: <a href="/myrpki/">{{ request.session.handle.handle }}</a>
+<h1>Parent View</h1>
+<p>Parent: {{ parent.handle }}
+<h2>Delegated Addresses</h2>
+{% if parent.address_range.count %}
+<table>
+ <tr><td>Low</td><td>High</td><td></td></tr>
+{% for a in parent.address_range.all %}
+<tr>
+ <td>{{ a.lo }}</td>
+ <td>{{ a.hi }}</td>
+ <td><a href="{{ a.get_absolute_url }}">view</a></td>
+</tr>
+{% endfor %}
+</table>
+{% else %}
+<p>--none--
+{% endif %}
+
+<h2>Delegated ASNs</h2>
+{% if parent.asn.count %}
+<ul>
+{% for a in parent.asn.all %}
+<li><a href="{{ a.get_absolute_url }}">{{ a }}</a>
+{% endfor %}
+</ul>
+{% else %}
+<p>--none--
+{% endif %}
+
+{% endblock %}
+{% extends "base.html" %}
+
+{% block content %}
+<p>Handle: <a href="/myrpki/">{{ request.session.handle.handle }}</a>
+<h1>Parent View</h1>
+<p>Parent: {{ parent.handle }}
+<h2>Delegated Addresses</h2>
+{% if parent.address_range.count %}
+<table>
+ <tr><td>Low</td><td>High</td><td></td></tr>
+{% for a in parent.address_range.all %}
+<tr>
+ <td>{{ a.lo }}</td>
+ <td>{{ a.hi }}</td>
+ <td><a href="{{ a.get_absolute_url }}">view</a></td>
+</tr>
+{% endfor %}
+</table>
+{% else %}
+<p>--none--
+{% endif %}
+
+<h2>Delegated ASNs</h2>
+{% if parent.asn.count %}
+<ul>
+{% for a in parent.asn.all %}
+<li><a href="{{ a.get_absolute_url }}">{{ a }}</a>
+{% endfor %}
+</ul>
+{% else %}
+<p>--none--
+{% endif %}
+
+{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/resource_view.html b/portal-gui/rpkigui/templates/myrpki/resource_view.html
new file mode 100644
index 00000000..55dc1b46
--- /dev/null
+++ b/portal-gui/rpkigui/templates/myrpki/resource_view.html
@@ -0,0 +1,86 @@
+{% extends "base.html" %}
+
+{% block content %}
+<p>Handle: <a href="/myrpki/">{{ request.session.handle }}</a>
+<h1>Resource Range View</h1>
+<table>
+ <tr>
+ <td>Range:</td><td>{{ addr }}</td>
+ </tr>
+ <tr>
+ <td>Parent:</td>
+ <td><a href="{{ parent.get_absolute_url }}">{{ parent.handle }}</a></td>
+ </tr>
+ {% if addr.parent %}
+ <tr>
+ <td>Suballocated from:</td>
+ <td><a href="{{ addr.parent.get_absolute_url }}">{{ addr.parent }}</a></td>
+ </tr>
+ {% endif %}
+</table>
+
+<h2>Suballocations</h2>
+
+{% if addr.children.count %}
+
+<ul>
+{% for subaddr in addr.children.all %}
+<li><a href="{{ subaddr.get_absolute_url }}">{{ subaddr }}</a>
+{% endfor %}
+</ul>
+
+{% else %}
+
+<p>--none--
+
+{% endif %}
+
+<form action="{{ request.url }}" method="post">
+ {{ form.as_p }}
+ <p><input type="submit" value="Submit">
+</form>
+
+{% endblock %}
+{% extends "base.html" %}
+
+{% block content %}
+<p>Handle: <a href="/myrpki/">{{ request.session.handle }}</a>
+<h1>Resource Range View</h1>
+<table>
+ <tr>
+ <td>Range:</td><td>{{ addr }}</td>
+ </tr>
+ <tr>
+ <td>Parent:</td>
+ <td><a href="{{ parent.get_absolute_url }}">{{ parent.handle }}</a></td>
+ </tr>
+ {% if addr.parent %}
+ <tr>
+ <td>Suballocated from:</td>
+ <td><a href="{{ addr.parent.get_absolute_url }}">{{ addr.parent }}</a></td>
+ </tr>
+ {% endif %}
+</table>
+
+<h2>Suballocations</h2>
+
+{% if addr.children.count %}
+
+<ul>
+{% for subaddr in addr.children.all %}
+<li><a href="{{ subaddr.get_absolute_url }}">{{ subaddr }}</a>
+{% endfor %}
+</ul>
+
+{% else %}
+
+<p>--none--
+
+{% endif %}
+
+<form action="{{ request.url }}" method="post">
+ {{ form.as_p }}
+ <p><input type="submit" value="Submit">
+</form>
+
+{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/roaform.html b/portal-gui/rpkigui/templates/myrpki/roaform.html
new file mode 100644
index 00000000..2678ed12
--- /dev/null
+++ b/portal-gui/rpkigui/templates/myrpki/roaform.html
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Edit ROA</h1>
+
+<p>Handle: <a href="/myrpki/">{{ request.session.handle }}</a>
+
+<form action="{{ request.url }}" method="POST">
+{{ form.as_p }}
+<p><input type="submit" value="Submit">
+</form>
+
+{% endblock %}
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Edit ROA</h1>
+
+<p>Handle: <a href="/myrpki/">{{ request.session.handle }}</a>
+
+<form action="{{ request.url }}" method="POST">
+{{ form.as_p }}
+<p><input type="submit" value="Submit">
+</form>
+
+{% endblock %}
diff --git a/portal-gui/rpkigui/templates/myrpki/xml_import.html b/portal-gui/rpkigui/templates/myrpki/xml_import.html
new file mode 100644
index 00000000..bdd449ad
--- /dev/null
+++ b/portal-gui/rpkigui/templates/myrpki/xml_import.html
@@ -0,0 +1,40 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Import {{ kind }}</h1>
+<p>Handle: {{ request.session.handle }}
+<p>Please select the xml file containing the identity of the <strong>{{ kind }}</strong> to import.
+{% if errors %}
+<ul>
+{% for e in errors %}
+<li>{{ e }}
+{% endfor %}
+</ul>
+{% endif %}
+
+<form enctype="multipart/form-data" action="{{ post_url }}" method="post">
+{{ form.as_p }}
+<input type="submit" value="Submit" />
+</form>
+
+{% endblock %}
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Import {{ kind }}</h1>
+<p>Handle: {{ request.session.handle }}
+<p>Please select the xml file containing the identity of the <strong>{{ kind }}</strong> to import.
+{% if errors %}
+<ul>
+{% for e in errors %}
+<li>{{ e }}
+{% endfor %}
+</ul>
+{% endif %}
+
+<form enctype="multipart/form-data" action="{{ post_url }}" method="post">
+{{ form.as_p }}
+<input type="submit" value="Submit" />
+</form>
+
+{% endblock %}