diff --git a/CHANGELOG.md b/CHANGELOG.md index 8557e24fb..f7b144483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,13 @@ All notable changes to this project will be documented in this file. ## [Unreleased] ### Added - Added Disks module to show free space of mounted partitions and -allow expanding the root partition. + allow expanding the root partition. - Added Persian (fa) locale. - Added Indonesian (id) locale. - Added options to toggle Tor relay and bridge relay modes. - Added Security module to control login restrictions. +- Added a page to display recent status log from Plinth. It is + accessible from the 500 error page. ### Fixed - Improved Dynamic DNS status message when no update needed. diff --git a/plinth/modules/help/help.py b/plinth/modules/help/help.py index 24fbf6965..476bb73a1 100644 --- a/plinth/modules/help/help.py +++ b/plinth/modules/help/help.py @@ -74,14 +74,14 @@ def manual(request): def status_logs(request): - """ Serves the last 100 lines of Status log""" - nr_lines = 100 - logfile = open(cfg.status_log_file, "r") + """Serve the last 100 lines of plinth's status log""" + num_lines = 100 + logfile = open(cfg.status_log_file, 'r') data = logfile.readlines() - data = "".join(data[-nr_lines:]) + data = ''.join(data[-num_lines:]) context = { - "nr_lines": nr_lines, - "data": data + 'num_lines': num_lines, + 'data': data } logfile.close() - return TemplateResponse(request, "statuslog.html", context) + return TemplateResponse(request, 'statuslog.html', context) diff --git a/plinth/modules/help/templates/statuslog.html b/plinth/modules/help/templates/statuslog.html index 2efc62ff5..bed2cae63 100644 --- a/plinth/modules/help/templates/statuslog.html +++ b/plinth/modules/help/templates/statuslog.html @@ -14,8 +14,7 @@ # 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 - . + # along with this program. If not,see . # {% endcomment %} @@ -24,10 +23,24 @@ {% block content %}

- {% blocktrans trimmed %} - This is the last {{ nr_lines }} lines of status log. - If you want to report a bug use bugtracker and attach this status log with that. -

{{ data }}
- {% endblocktrans %} + {% blocktrans trimmed %} + This is the last {{ num_lines }} lines of the status log for this web + interface. If you want to report a bug, please use the + bugtracker and + attach this status log to the bug report. + {% endblocktrans %}

-{% endblock %} \ No newline at end of file + +

+ + {% blocktrans trimmed %} + Caution: Please remove any passwords or other personal information from the + log, before submitting the bug report. + {% endblocktrans %} + +

+ +

+

{{ data }}
+

+{% endblock %} diff --git a/plinth/modules/help/urls.py b/plinth/modules/help/urls.py index 363e0c59f..3e553cf75 100644 --- a/plinth/modules/help/urls.py +++ b/plinth/modules/help/urls.py @@ -32,5 +32,5 @@ urlpatterns = [ url(r'^help/index/$', views.index, name='index_explicit'), url(r'^help/about/$', views.about, name='about'), url(r'^help/manual/$', views.manual, name='manual'), - url(r'^help/status-logs',views.status_logs,name='status-logs'), + url(r'^help/status-logs/$', views.status_logs, name='status-logs'), ] diff --git a/plinth/templates/500.html b/plinth/templates/500.html index 67f3fa06d..ded166905 100644 --- a/plinth/templates/500.html +++ b/plinth/templates/500.html @@ -29,8 +29,8 @@ This is an internal error and not something you caused or can fix. Please report the error on the bug - tracker so we can fix it. - Please Attatch the Status Log along with the bug + tracker so we can fix it. Also, please attach the + Status Log to the bug report. {% endblocktrans %}