mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Make minor changes to status log page
This commit is contained in:
parent
15a336613b
commit
561c7c1e6b
@ -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.
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
<http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not,see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
{% endcomment %}
|
||||
|
||||
@ -24,10 +23,24 @@
|
||||
{% block content %}
|
||||
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
This is the last {{ nr_lines }} lines of status log.
|
||||
If you want to report a bug use <a href="https://github.com/freedombox/Plinth/issues">bugtracker</a> and attach this status log with that.
|
||||
<pre>{{ data }}</pre>
|
||||
{% 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
|
||||
<a href="https://github.com/freedombox/Plinth/issues">bugtracker</a> and
|
||||
attach this status log to the bug report.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
<p>
|
||||
<b>
|
||||
{% blocktrans trimmed %}
|
||||
Caution: Please remove any passwords or other personal information from the
|
||||
log, before submitting the bug report.
|
||||
{% endblocktrans %}
|
||||
</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<pre>{{ data }}</pre>
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@ -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'),
|
||||
]
|
||||
|
||||
@ -29,8 +29,8 @@
|
||||
This is an internal error and not something you caused or can
|
||||
fix. Please report the error on
|
||||
the <a href="https://github.com/freedombox/Plinth/issues">bug
|
||||
tracker</a> so we can fix it.
|
||||
Please Attatch the <a href="/plinth/help/status-logs">Status Log</a> along with the bug
|
||||
tracker</a> so we can fix it. Also, please attach the
|
||||
<a href="/plinth/help/status-logs">Status Log</a> to the bug report.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user