mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
wireguard: Add template to show generated client info
Signed-off-by: Frederico Gomes <fredericojfgomes@gmail.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
8cbcd39bb2
commit
81e60dff0e
@ -0,0 +1,46 @@
|
||||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
|
||||
{% load bootstrap %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>{{ title }}</h3>
|
||||
|
||||
<form class="form form-auto-add-client" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form|bootstrap }}
|
||||
|
||||
{% if client_privkey %}
|
||||
<div class="form-group">
|
||||
<table class="table table-sm">
|
||||
<tr><td>{% trans "IP Address" %}</td><td>{{ next_ip }}</td></tr>
|
||||
<tr><td>{% trans "Endpoint" %}</td><td>{{ endpoint }}</td></tr>
|
||||
<tr><td>{% trans "Public Key" %}</td><td>{{ client_pubkey }}</td></tr>
|
||||
<tr><td>{% trans "Private Key" %}</td>
|
||||
<td>
|
||||
<details><summary>{% trans "Click to reveal" %}</summary>
|
||||
{{ client_privkey }}
|
||||
</details>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<strong>{% trans "Important:" %}</strong>
|
||||
{% trans "Save the private key now. This page shows it only once!" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary"
|
||||
value="{% trans "Add Connection" %}"/>
|
||||
<a href="{% url 'wireguard:index' %}" class="btn btn-secondary">
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Loading…
x
Reference in New Issue
Block a user