From ccc4bd120bcfe604c25c420ed5c5b5a175a5a3c5 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Wed, 13 Feb 2019 05:25:00 +0530 Subject: [PATCH] names: Add description Signed-off-by: Joseph Nuthalapati Reviewed-by: Sunil Mohan Adapa --- plinth/modules/names/__init__.py | 11 +++++++++++ plinth/modules/names/views.py | 12 +++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/plinth/modules/names/__init__.py b/plinth/modules/names/__init__.py index 5e335ae00..4de490e40 100644 --- a/plinth/modules/names/__init__.py +++ b/plinth/modules/names/__init__.py @@ -22,8 +22,10 @@ import logging from django.utils.translation import ugettext_lazy as _ +from plinth import cfg from plinth.menu import main_menu from plinth.signals import domain_added, domain_removed +from plinth.utils import format_lazy from .manifest import backup @@ -46,6 +48,15 @@ logger = logging.getLogger(__name__) manual_page = 'NameServices' +description = [ + format_lazy( + _('Name Services provides an overview of the ways {box_name} can be ' + 'reached from the public Internet: domain name, Tor hidden service, ' + 'and Pagekite. For each type of name, it is shown whether the HTTP, ' + 'HTTPS, and SSH services are enabled or disabled for incoming ' + 'connections through the given name.'), box_name=(cfg.box_name)) +] + def init(): """Initialize the names module.""" diff --git a/plinth/modules/names/views.py b/plinth/modules/names/views.py index ac8adedac..ce0acd4ff 100644 --- a/plinth/modules/names/views.py +++ b/plinth/modules/names/views.py @@ -31,11 +31,13 @@ def index(request): """Serve name services page.""" status = get_status() - return TemplateResponse(request, 'names.html', { - 'title': names.name, - 'manual_page': names.manual_page, - 'status': status - }) + return TemplateResponse( + request, 'names.html', { + 'title': names.name, + 'description': names.description, + 'manual_page': names.manual_page, + 'status': status + }) def get_status():