mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Small old issue where the number of line filtered doesnt match the requested number, and then the admin doesn't display the 'show more line' button..
This commit is contained in:
parent
7edd3ff840
commit
88997f5728
1 changed files with 5 additions and 1 deletions
|
@ -269,11 +269,15 @@ def log_display(path, number=None, share=False, filter_irrelevant=False, with_su
|
|||
# Display logs if exist
|
||||
if os.path.exists(log_path):
|
||||
from yunohost.service import _tail
|
||||
if number:
|
||||
if number and filters:
|
||||
logs = _tail(log_path, int(number*4))
|
||||
elif number:
|
||||
logs = _tail(log_path, int(number))
|
||||
else:
|
||||
logs = read_file(log_path)
|
||||
logs = _filter_lines(logs, filters)
|
||||
if number:
|
||||
logs = logs[-number:]
|
||||
infos['log_path'] = log_path
|
||||
infos['logs'] = logs
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue