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