diff --git a/plinth/modules/monkeysphere/__init__.py b/plinth/modules/monkeysphere/__init__.py index b7a8329f3..09be4a195 100644 --- a/plinth/modules/monkeysphere/__init__.py +++ b/plinth/modules/monkeysphere/__init__.py @@ -23,11 +23,31 @@ from django.utils.translation import ugettext_lazy as _ from plinth import cfg +version = 1 + depends = ['system'] +title = _('Monkeysphere') + +description = [ + _('With Monkeysphere, a PGP key can be generated for each configured ' + 'domain serving SSH. The PGP public key can then be uploaded to the PGP ' + 'keyservers. Users connecting to this machine through SSH can verify ' + 'that they are connecting to the correct host. For users to trust the ' + 'key, at least one person (usually the machine owner) must sign the key ' + 'using the regular PGP key signing process. See the ' + ' ' + 'Monkeysphere SSH documentation for more details.') +] + def init(): """Initialize the monkeysphere module.""" menu = cfg.main_menu.get('system:index') menu.add_urlname(_('Monkeysphere'), 'glyphicon-certificate', 'monkeysphere:index', 970) + + +def setup(helper, old_version=None): + """Install and configure the module.""" + helper.install(['monkeysphere']) diff --git a/plinth/modules/monkeysphere/templates/monkeysphere.html b/plinth/modules/monkeysphere/templates/monkeysphere.html index 2e67c5204..ebe048590 100644 --- a/plinth/modules/monkeysphere/templates/monkeysphere.html +++ b/plinth/modules/monkeysphere/templates/monkeysphere.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "app.html" %} {% comment %} # # This file is part of Plinth. @@ -30,22 +30,7 @@ {% endblock %} -{% block content %} - -
- {% blocktrans trimmed %} - With Monkeysphere, a PGP key can be generated for each configured domain - serving SSH. The PGP public key can then be uploaded to the PGP - keyservers. Users connecting to this machine through SSH can verify that - they are connecting to the correct host. For users to trust the key, at - least one person (usually the machine owner) must sign the key using the - regular PGP key signing process. See the - - Monkeysphere SSH documentation for more details. - {% endblocktrans %} -
+{% block configuration %} {% if running %}diff --git a/plinth/modules/monkeysphere/views.py b/plinth/modules/monkeysphere/views.py index 777c64b25..2ce31d22d 100644 --- a/plinth/modules/monkeysphere/views.py +++ b/plinth/modules/monkeysphere/views.py @@ -28,20 +28,20 @@ from django.views.decorators.http import require_POST import json from plinth import actions -from plinth import package +from plinth.modules import monkeysphere from plinth.modules import names publish_process = None -@package.required(['monkeysphere']) def index(request): """Serve configuration page.""" _collect_publish_result(request) status = get_status() return TemplateResponse( request, 'monkeysphere.html', - {'title': _('Monkeysphere'), + {'title': monkeysphere.title, + 'description': monkeysphere.description, 'status': status, 'running': bool(publish_process)})