add ability to delete peerings

+ format all files
+ fix "selected_peering" not being defined in /peerings/edit
This commit is contained in:
lare 2022-12-07 17:00:52 +01:00
parent ff4865f4b6
commit 537400f77a
10 changed files with 464 additions and 238 deletions

View file

@ -1,31 +1,64 @@
{% extends 'base.html' %}
{% block content %}
{% if msg %}
<div style="background-color: red;">
{{msg}}
</div>
{% extends 'base.html' %} {% block content %} {% if msg %}
<div style="background-color: red">{{msg}}</div>
{% endif %}
<form action="https://dn42.g-load.eu/auth/">
<link rel="stylesheet" href="https://dn42.g-load.eu/auth/assets/button-font/auth.css">
<input type="hidden" id="return" name="return" value='{{"http://"+config["domain"]+"/api/auth/kverify"}}'>
<button type="submit" class="kioubit-btn kioubit-btn-primary kioubit-btn-dark kioubit-btn-main">
<link
rel="stylesheet"
href="https://dn42.g-load.eu/auth/assets/button-font/auth.css"
/>
<input
type="hidden"
id="return"
name="return"
value='{{"http://"+config["domain"]+"/api/auth/kverify"}}'
/>
<button
type="submit"
class="kioubit-btn kioubit-btn-primary kioubit-btn-dark kioubit-btn-main"
>
<span class="icon-kioubit-auth"></span>Authenticate with Kioubit.dn42
</button>
</button>
</form>
{% if config["debug-mode"] %}
<form action="" method="post" class="flex">
<label for="debug">Debug login, if you see this in Production contact {{config["MNT"]}}</label><br>
<input type="text" name="mnt" id="mnt" placeholder="YOUR-MNT" required><br>
<input type="text" name="asn" id="asn" placeholder="AS4242420000" required><br>
<input type="text" name="allowed4" id="allowed4" placeholder="ipv4 subnet (optional)"><br>
<input type="text" name="allowed6" id="allowed6" placeholder="ipv6 subnet (optional)"><br>
<input type="number" name="theanswer" id="theanswer" placeholder="The answer for everything" required><br>
<input type="submit" value="login">
<label for="debug"
>Debug login, if you see this in Production contact {{config["MNT"]}}</label
><br />
<input
type="text"
name="mnt"
id="mnt"
placeholder="YOUR-MNT"
required
/><br />
<input
type="text"
name="asn"
id="asn"
placeholder="AS4242420000"
required
/><br />
<input
type="text"
name="allowed4"
id="allowed4"
placeholder="ipv4 subnet (optional)"
/><br />
<input
type="text"
name="allowed6"
id="allowed6"
placeholder="ipv6 subnet (optional)"
/><br />
<input
type="number"
name="theanswer"
id="theanswer"
placeholder="The answer for everything"
required
/><br />
<input type="submit" value="login" />
</form>
{% endif %}
{% endblock %}
{% endif %} {% endblock %}