diff --git a/plinth/modules/datetime/templates/datetime.html b/plinth/modules/datetime/templates/datetime.html deleted file mode 100644 index 2e8d24d04..000000000 --- a/plinth/modules/datetime/templates/datetime.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "service.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 . -# -{% endcomment %} - -{% block diagnostics %} -

- {% include "diagnostics_button.html" with module="datetime" %} -

-{% endblock %} diff --git a/plinth/modules/datetime/views.py b/plinth/modules/datetime/views.py index 4606e6cb7..61be26b7b 100644 --- a/plinth/modules/datetime/views.py +++ b/plinth/modules/datetime/views.py @@ -35,7 +35,7 @@ class DateTimeServiceView(ServiceView): description = datetime.description form_class = DateTimeForm service_id = datetime.managed_services[0] - template_name = "datetime.html" + diagnostics_module_name = "datetime" def get_initial(self): return {'is_enabled': self.service.is_enabled(), diff --git a/plinth/service.py b/plinth/service.py index 1f2dc379a..9095ef19e 100644 --- a/plinth/service.py +++ b/plinth/service.py @@ -39,16 +39,14 @@ class Service(object): - service_id: unique service name. If possible this should be the name of the service on operating system level (as in /etc/init.d/). - name: service name as to be displayed in the GUI - - description (optional): list of paragraphs that describe the service - is_enabled (optional): Boolean, or a Function returning Boolean - enable (optional): Function - disable (optional): Function - is_running (optional): Boolean, or a Function returning Boolean """ - def __init__(self, service_id, name, ports=None, description=None, - is_external=False, is_enabled=None, enable=None, disable=None, - is_running=None): + def __init__(self, service_id, name, ports=None, is_external=False, + is_enabled=None, enable=None, disable=None, is_running=None): if ports is None: ports = [service_id] @@ -57,7 +55,6 @@ class Service(object): self.service_id = service_id self.name = name - self.description = description self.ports = ports self.is_external = is_external self._is_enabled = is_enabled diff --git a/plinth/views.py b/plinth/views.py index 076377356..8bdd1b84f 100644 --- a/plinth/views.py +++ b/plinth/views.py @@ -38,7 +38,7 @@ def index(request): class ServiceView(FormView): - """A generic view for configuring simple modules.""" + """A generic view for configuring simple services.""" service_id = None form_class = forms.ServiceForm template_name = 'service.html' @@ -70,7 +70,7 @@ class ServiceView(FormView): return service def get_initial(self): - """Return the status of the module to fill in the form.""" + """Return the status of the service to fill in the form.""" return {'is_enabled': self.service.is_enabled(), 'is_running': self.service.is_running()}