fix terminal
This commit is contained in:
parent
3640dff6d7
commit
77a85bcb02
3 changed files with 16 additions and 7 deletions
|
|
@ -250,6 +250,14 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
mlflowEnabled.addEventListener('change', updateMlflowFields);
|
||||
|
||||
// --- Logger ---
|
||||
function scrollToLogBottom(container) {
|
||||
if (!container) return;
|
||||
container.scrollTop = container.scrollHeight;
|
||||
if (container.lastElementChild && container.lastElementChild.scrollIntoView) {
|
||||
container.lastElementChild.scrollIntoView({ block: 'end' });
|
||||
}
|
||||
}
|
||||
|
||||
function addLogLine(message, level = 'info') {
|
||||
const line = document.createElement('div');
|
||||
line.className = `log-line log-level-${level.toLowerCase()}`;
|
||||
|
|
@ -257,7 +265,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
logContainer.appendChild(line);
|
||||
|
||||
if (autoscrollCheck.checked) {
|
||||
logContainer.scrollTop = logContainer.scrollHeight;
|
||||
scrollToLogBottom(logContainer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -381,7 +389,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
addLogLine(data.message, data.level);
|
||||
}
|
||||
if (autoscrollCheck && autoscrollCheck.checked) {
|
||||
logContainer.scrollTop = logContainer.scrollHeight;
|
||||
scrollToLogBottom(logContainer);
|
||||
}
|
||||
} else if (data.type === 'progress') {
|
||||
updateProgress(data.epoch, data.total_epochs, data.message);
|
||||
|
|
@ -1024,7 +1032,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
exportLogContainer.appendChild(line);
|
||||
|
||||
if (exportAutoscrollCheck.checked) {
|
||||
exportLogContainer.scrollTop = exportLogContainer.scrollHeight;
|
||||
scrollToLogBottom(exportLogContainer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||
<link rel="stylesheet" href="/static/style.css?v=3">
|
||||
<link rel="stylesheet" href="/static/style.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<header class="app-header">
|
||||
|
|
@ -536,6 +536,6 @@
|
|||
</section>
|
||||
</div> <!-- End export-view -->
|
||||
</main>
|
||||
<script src="/static/app.js?v=2"></script>
|
||||
<script src="/static/app.js?v=4"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -183,8 +183,9 @@ body {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Custom Scrollbars */
|
||||
|
|
@ -768,7 +769,7 @@ body {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 480px;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue