diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-11-12 10:23:02 +0100 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-11-12 10:37:31 +0100 |
commit | 92ab31650c60163607ea5b00c57a7b223ef49bd4 (patch) | |
tree | 971dc4d94877ce8de800b535ce83cc9380821e8a /ogcp/templates/actions/legacy | |
parent | 9c7a687d56031df8ff2ae94f608fda98fdc6c464 (diff) |
log: show the end of the log and make it scrollable
Show the latest lines of the log first as they contain the
information relevant to the latest operations.
Show the logs inside an scrollable widget.
Diffstat (limited to 'ogcp/templates/actions/legacy')
-rw-r--r-- | ogcp/templates/actions/legacy/log.html | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ogcp/templates/actions/legacy/log.html b/ogcp/templates/actions/legacy/log.html index a3f252c..12c7c50 100644 --- a/ogcp/templates/actions/legacy/log.html +++ b/ogcp/templates/actions/legacy/log.html @@ -20,6 +20,20 @@ } </style> -<pre>{{ log }}</pre> +<div class="container-fluid d-flex flex-column" style="height: 90vh;"> + <div class="border p-3 overflow-auto flex-grow-1" id="logContainer"> + <pre>{{ log }}</pre> + </div> +</div> + +<script> + function scrollToBottom() { + const logContainer = document.getElementById('logContainer'); + logContainer.scrollTo({ top: logContainer.scrollHeight, behavior: 'instant' }); + } + + document.addEventListener("DOMContentLoaded", scrollToBottom); +</script> + {% endblock %} |