#
# 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
The system diagnostic test will run a number of checks on your system to confirm that network services are running and configured properly. It may take a minute to complete.
""") main += '' return util.render_template(title=_("System Diagnostics"), main=main) class test(PagePlugin): order = 31 def __init__(self, *args, **kwargs): PagePlugin.__init__(self, *args, **kwargs) self.register_page("sys.diagnostics.test") @cherrypy.expose @require() def index(self): main = '' output, error = actions.superuser_run("diagnostic-test") if error: main += _("The diagnostic test encountered an error:") for line in error.split('\n'): main += line + "" if output: main += _("Output of diagnostic test:") for line in output.split('\n'): main += line + "" return util.render_template(title=_("Diagnostic Test"), main=main)