mirror of https://git.48k.eu/ogcp
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.master
parent
9c7a687d56
commit
92ab31650c
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue