monkeysphere: Use new setup mechanism

This commit is contained in:
Sunil Mohan Adapa 2016-02-12 15:53:42 +05:30
parent cef8f5c2c4
commit 608d19dc2b
No known key found for this signature in database
GPG Key ID: 36C361440C9BC971
3 changed files with 25 additions and 20 deletions

View File

@ -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 '
'<a href="http://web.monkeysphere.info/getting-started-ssh/"> '
'Monkeysphere SSH documentation</a> 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'])

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "app.html" %}
{% comment %}
#
# This file is part of Plinth.
@ -30,22 +30,7 @@
{% endblock %}
{% block content %}
<h2>{% trans "Monkeysphere" %}</h2>
<p>
{% 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
<a href="http://web.monkeysphere.info/getting-started-ssh/">
Monkeysphere SSH documentation</a> for more details.
{% endblocktrans %}
</p>
{% block configuration %}
{% if running %}
<p class="running-status-parent">

View File

@ -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)})