Update: Modifico el código para permitir ver dos estancias en un mismo monitor
This commit is contained in:
@@ -8,11 +8,9 @@
|
||||
}
|
||||
|
||||
.animate-scroll {
|
||||
display: inline-block;
|
||||
animation: scroll 45s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@keyframes blink {
|
||||
0%, 100% { background-color: #0a6eb2}
|
||||
50% { background-color: #ffff00; color: black; }
|
||||
|
||||
@@ -3,11 +3,11 @@ const estadoAnterior = {};
|
||||
|
||||
let ultimoFooter = "";
|
||||
|
||||
function cargarTabla() {
|
||||
fetch("/api/datos")
|
||||
function cargarTabla(endpoint, tablaId) {
|
||||
fetch(endpoint)
|
||||
.then(res => res.json())
|
||||
.then(filas => {
|
||||
const tbody = document.getElementById("turnos");
|
||||
const tbody = document.getElementById(tablaId);
|
||||
tbody.innerHTML = "";
|
||||
|
||||
let sizeClass = "";
|
||||
@@ -75,7 +75,11 @@ function cargarFooter() {
|
||||
});
|
||||
}
|
||||
|
||||
function actualizarTablas(){
|
||||
cargarTabla("/api/datos1","turnos1");
|
||||
cargarTabla("/api/datos2","turnos2");
|
||||
}
|
||||
cargarFooter();
|
||||
cargarTabla();
|
||||
setInterval(cargarTabla, 30000);
|
||||
actualizarTablas();
|
||||
setInterval(actualizarTablas, 30000);
|
||||
setInterval(cargarFooter, 45000);
|
||||
Reference in New Issue
Block a user