Development
This commit is contained in:
parent
4a24c71d87
commit
d004026285
1 changed files with 5 additions and 6 deletions
|
|
@ -474,12 +474,11 @@ def _ddns_log_tail():
|
||||||
tail = lines[-DDNS_LOG_MAX:]
|
tail = lines[-DDNS_LOG_MAX:]
|
||||||
shown = len(tail)
|
shown = len(tail)
|
||||||
hidden = total - shown
|
hidden = total - shown
|
||||||
size_str = f'{size_kb:.1f}KB'
|
size_str = f'{size_kb:.1f} KB'
|
||||||
if hidden > 0:
|
left = f'Showing last {shown} lines ({hidden} lines not shown)' if hidden > 0 else f'Showing {shown} lines'
|
||||||
summary = f'Log file size: {size_str}. Showing last {shown} lines ({hidden} lines not shown).'
|
summary = (f'<div class="text-muted" style="display:flex;justify-content:space-between;margin-top:0.5em;">'
|
||||||
else:
|
f'<span>{left}</span><span>Log file size: {size_str}</span></div>')
|
||||||
summary = f'Log file size: {size_str}. Showing {shown} lines.'
|
return ''.join(tail).strip(), summary
|
||||||
return ''.join(tail).strip(), f'<p class="text-muted" style="margin-top:0.5em;">{summary}</p>'
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
return '(log file not found)', ''
|
return '(log file not found)', ''
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue