mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-22 10:01:45 +00:00
monkeysphere: Run publish as background task, allow user to cancel. Small fixes to names module: - Remove unused ugettext import. - Change SERVICES to tuple. - If a domain is not available for a service type, return None instead of (translated) "Not Available". - Rename get_services -> get_enabled_services.
109 lines
3.2 KiB
HTML
109 lines
3.2 KiB
HTML
{% extends "base.html" %}
|
|
{% comment %}
|
|
#
|
|
# This file is part of Plinth.
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
{% endcomment %}
|
|
|
|
{% load bootstrap %}
|
|
{% load i18n %}
|
|
|
|
{% block page_head %}
|
|
|
|
{% if running %}
|
|
<meta http-equiv="refresh" content="3"/>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
|
|
<h2>{% trans "Monkeysphere" %}</h2>
|
|
|
|
<p>
|
|
{% blocktrans trimmed with box_name=cfg.box_name %}
|
|
With Monkeysphere, a PGP key can be generated for each domain
|
|
serving SSH on this {{ box_name }}. The PGP public key can then be
|
|
uploaded to the PGP keyservers. Users connecting to this {{ box_name }}
|
|
through SSH can verify that they are connecting to the correct
|
|
host. See the
|
|
<a href="http://web.monkeysphere.info/getting-started-ssh/">
|
|
Monkeysphere SSH documentation</a> for more details.
|
|
{% endblocktrans %}
|
|
</p>
|
|
|
|
{% if running %}
|
|
<p class="running-status-parent">
|
|
<span class="running-status active"></span>
|
|
{% trans "Publishing key to keyserver..." %}
|
|
|
|
<form class="form" method="post"
|
|
action="{% url 'monkeysphere:cancel' %}">
|
|
{% csrf_token %}
|
|
|
|
<button type="submit" class="btn btn-warning btn-sm">
|
|
{% trans "Cancel" %}</button>
|
|
</form>
|
|
</p>
|
|
{% endif %}
|
|
|
|
<div class="row">
|
|
<div class="col-sm-8">
|
|
<table class="table table-bordered table-condensed table-striped">
|
|
{% for name_service in status.name_services %}
|
|
<tr>
|
|
<td>
|
|
<b>{{ name_service.type }}</b><br>
|
|
<i>{{ name_service.name }}</i>
|
|
</td>
|
|
<td>
|
|
{% if name_service.key %}
|
|
{{ name_service.key.pgp_fingerprint }}
|
|
{% else %}
|
|
{% trans "Not Available" %}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if name_service.available %}
|
|
{% if not name_service.key %}
|
|
<form class="form" method="post"
|
|
action="{% url 'monkeysphere:generate' name_service.short_type %}">
|
|
{% csrf_token %}
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm pull-right">
|
|
{% trans "Generate PGP Key" %}</button>
|
|
</form>
|
|
|
|
{% elif not running %}
|
|
<form class="form" method="post"
|
|
action="{% url 'monkeysphere:publish' name_service.key.pgp_fingerprint %}">
|
|
{% csrf_token %}
|
|
|
|
<button type="submit" class="btn btn-warning btn-sm pull-right">
|
|
{% trans "Publish Key" %}</button>
|
|
</form>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|