Spaces:
Sleeping
Sleeping
File size: 2,279 Bytes
2cfac3a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | <!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Creación de Plano - En Proceso</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
color: #333;
text-align: center;
padding: 20px;
}
.container {
max-width: 600px;
margin: auto;
padding: 40px;
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
font-size: 24px;
margin-bottom: 20px;
}
.spinner {
width: 50px;
height: 50px;
margin: 20px auto;
border: 8px solid #f3f3f3;
border-top: 8px solid #3498db;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
#log {
margin-top: 20px;
font-family: monospace;
white-space: pre-wrap;
border: 1px solid #ddd;
padding: 10px;
background: #fafafa;
max-height: 300px;
overflow-y: auto;
}
</style>
</head>
<body>
<div class="container">
<h1>Creación de Plano en Proceso...</h1>
<div class="spinner"></div>
<div id="log">Log de Proceso:</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Check progress every 2 seconds
setInterval(function() {
fetch('/check_progress')
.then(response => response.json())
.then(data => {
if (data.completed) {
if (data.redirect_url) {
window.location.href = data.redirect_url;
}
} else {
document.getElementById('log').textContent = "Log de Proceso:\n" + data.log;
}
})
.catch(error => console.error('Error al verificar el progreso:', error));
}, 2000);
});
</script>
</body>
</html>
|