new editor features
This commit is contained in:
@@ -459,6 +459,7 @@
|
||||
let activeInterval = null;
|
||||
// Only auto-poll if we have a latest run
|
||||
let currentRunId = {{ active_run.id if active_run else 'null' }};
|
||||
const initialRunStatus = "{{ active_run.status if active_run else '' }}";
|
||||
|
||||
function fetchLog() {
|
||||
if (!currentRunId) return;
|
||||
@@ -509,8 +510,9 @@
|
||||
} else {
|
||||
if (activeInterval) clearInterval(activeInterval);
|
||||
activeInterval = null;
|
||||
// Reload page on completion to show download buttons
|
||||
if (data.status === 'completed' && !document.querySelector('.alert-success')) {
|
||||
|
||||
// Reload if we were polling (watched it finish) OR if page loaded as running but is now done
|
||||
if (initialRunStatus === 'running' || initialRunStatus === 'queued') {
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user