diff --git a/app/templates/base.html b/app/templates/base.html index f3c9d03..aa412bd 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -133,13 +133,13 @@ Direct meshcli commands - + System Log Real-time application logs - + diff --git a/app/templates/index.html b/app/templates/index.html index 40963c4..c1168f1 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -44,6 +44,7 @@ /* Modal fullscreen - remove all margins and padding */ #dmModal .modal-dialog.modal-fullscreen, #contactsModal .modal-dialog.modal-fullscreen, + #logsModal .modal-dialog.modal-fullscreen, #consoleModal .modal-dialog.modal-fullscreen { margin: 0 !important; width: 100vw !important; @@ -54,6 +55,7 @@ #dmModal .modal-content, #contactsModal .modal-content, + #logsModal .modal-content, #consoleModal .modal-content { border: none !important; border-radius: 0 !important; @@ -62,6 +64,7 @@ #dmModal .modal-body, #contactsModal .modal-body, + #logsModal .modal-body, #consoleModal .modal-body { overflow: hidden !important; } @@ -230,6 +233,23 @@ + + + + + + + System Log + + Close + + + + + + + + {% endblock %} {% block extra_scripts %} @@ -302,6 +322,23 @@ } }); } + + // System Log modal - load iframe on open, clear on close + const logsModal = document.getElementById('logsModal'); + if (logsModal) { + logsModal.addEventListener('show.bs.modal', function () { + const logsFrame = document.getElementById('logsFrame'); + if (logsFrame) { + logsFrame.src = '/logs'; + } + }); + logsModal.addEventListener('hidden.bs.modal', function () { + const logsFrame = document.getElementById('logsFrame'); + if (logsFrame) { + logsFrame.src = ''; // disconnect WebSocket when closed + } + }); + } }); {% endblock %} diff --git a/app/templates/logs.html b/app/templates/logs.html index a6e331f..48235b4 100644 --- a/app/templates/logs.html +++ b/app/templates/logs.html @@ -151,15 +151,11 @@ - - - - - System Log - 0 entries + +