From 4a24c71d870ce44999d320a58d46b1811deb2428 Mon Sep 17 00:00:00 2001 From: Matthew Grotke Date: Sat, 23 May 2026 16:55:48 -0400 Subject: [PATCH] Development --- docker/routlin-dash/app/view_page.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/routlin-dash/app/view_page.py b/docker/routlin-dash/app/view_page.py index 390bfff..4760fa4 100644 --- a/docker/routlin-dash/app/view_page.py +++ b/docker/routlin-dash/app/view_page.py @@ -465,6 +465,7 @@ DDNS_LOG_MAX = 50 def _ddns_log_tail(): log_path = f'{CONFIGS_DIR}/ddns.log' try: + size_kb = os.path.getsize(log_path) / 1024 with open(log_path) as f: lines = f.readlines() if not lines: @@ -473,10 +474,11 @@ def _ddns_log_tail(): tail = lines[-DDNS_LOG_MAX:] shown = len(tail) hidden = total - shown + size_str = f'{size_kb:.1f}KB' if hidden > 0: - summary = f'Showing last {shown} lines ({hidden} lines not shown)' + summary = f'Log file size: {size_str}. Showing last {shown} lines ({hidden} lines not shown).' else: - summary = f'Showing {shown} lines' + summary = f'Log file size: {size_str}. Showing {shown} lines.' return ''.join(tail).strip(), f'

{summary}

' except FileNotFoundError: return '(log file not found)', ''