mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
parent
ea47454f90
commit
8d5ef42b73
@ -71,3 +71,14 @@ def manual(request):
|
|||||||
request, 'help_manual.html',
|
request, 'help_manual.html',
|
||||||
{'title': _('{box_name} Manual').format(box_name=_(cfg.box_name)),
|
{'title': _('{box_name} Manual').format(box_name=_(cfg.box_name)),
|
||||||
'content': content})
|
'content': content})
|
||||||
|
|
||||||
|
def status_logs(request):
|
||||||
|
X = 100
|
||||||
|
file = open(cfg.status_log_file,"r")
|
||||||
|
data = file.readlines()
|
||||||
|
data = "".join(data[-X:])
|
||||||
|
context = {
|
||||||
|
"X":X,
|
||||||
|
"data":data
|
||||||
|
}
|
||||||
|
return TemplateResponse(request, "statuslog.html", context)
|
||||||
|
|||||||
32
plinth/modules/help/templates/statuslog.html
Normal file
32
plinth/modules/help/templates/statuslog.html
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{% extends 'help_base.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
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
This is the last {{ X }} lines of status log Please attatch with the bug when raising a bug.
|
||||||
|
<pre>{{ data }}</pre>
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
{% endblock %}
|
||||||
@ -32,4 +32,5 @@ urlpatterns = [
|
|||||||
url(r'^help/index/$', views.index, name='index_explicit'),
|
url(r'^help/index/$', views.index, name='index_explicit'),
|
||||||
url(r'^help/about/$', views.about, name='about'),
|
url(r'^help/about/$', views.about, name='about'),
|
||||||
url(r'^help/manual/$', views.manual, name='manual'),
|
url(r'^help/manual/$', views.manual, name='manual'),
|
||||||
|
url(r'^help/status-logs',views.status_logs,name='status-logs'),
|
||||||
]
|
]
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
fix. Please report the error on
|
fix. Please report the error on
|
||||||
the <a href="https://github.com/freedombox/Plinth/issues">bug
|
the <a href="https://github.com/freedombox/Plinth/issues">bug
|
||||||
tracker</a> so we can fix it.
|
tracker</a> so we can fix it.
|
||||||
|
Please Attatch the <a href="/plinth/help/status-logs">Status Log</a> along with the bug
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user