diff --git a/frontend/templates/index.html b/frontend/templates/index.html index 004df90..b006d78 100644 --- a/frontend/templates/index.html +++ b/frontend/templates/index.html @@ -81,6 +81,7 @@ function setPhase(label, pct, isSpinner) { const el = document.getElementById('phase-label'); const fill = document.getElementById('progress-fill'); if (el) el.innerHTML = (isSpinner ? ' ' : '') + label; + if (fill) { fill.style.width = pct + '%'; fill.textContent = pct > 0 ? pct + '%' : ''; } } function showError(msg) { @@ -137,7 +138,6 @@ async function startSession(e) { btn.disabled = false; } async function handleUpload(formData) { - console.log('handleUpload called, file:', formData.get('source_file')?.name); return new Promise((resolve) => { const xhr = new XMLHttpRequest(); const file = formData.get('source_file'); @@ -152,7 +152,6 @@ async function handleUpload(formData) { xhr.setRequestHeader('X-VM-Name', vmName); xhr.upload.addEventListener('progress', (e) => { - console.log('progress', e.loaded, '/', e.total, 'computable:', e.lengthComputable); if (e.lengthComputable) { const pct = Math.round((e.loaded / e.total) * 100); setPhase('Uploading source file... ' + (e.loaded / (1024**3)).toFixed(1) + ' GiB', pct, false); @@ -163,7 +162,6 @@ async function handleUpload(formData) { }); xhr.addEventListener('loadstart', () => { - console.log('loadstart'); setPhase('Uploading source file...', 0, true); });