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 - + + + + + + {% 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 +
+