Fix Update: Habilito el pie para que muestre los pies de los dos monitores

This commit is contained in:
2025-07-29 13:28:55 +02:00
parent 917bef33be
commit 37013da56f
4 changed files with 10 additions and 9 deletions
+4 -4
View File
@@ -25,15 +25,15 @@ def obtener_turnos(mon_id):
print(f"Error al conectar: {e}")
return None
def obtener_pie(mon_id):
def obtener_pie(mon_id1, mon_id2):
conn = get_connection()
if not conn:
return []
try:
cursor = conn.cursor()
cursor.execute("SELECT MENSAJE FROM CSMK_MONITOR_PIE WHERE MONITOR_ID = :monitor AND INACTIVO = 0 ORDER BY MONITOR_PIE_ID ASC",{'monitor':mon_id})
cursor.execute("SELECT MENSAJE FROM CSMK_MONITOR_PIE WHERE MONITOR_ID IN (:monitor, :monitor2) AND INACTIVO = 0 ORDER BY MONITOR_ID, MONITOR_PIE_ID ASC",{'monitor':mon_id1, 'monitor2':mon_id2})
mensajes = [fila[0] for fila in cursor.fetchall()]
mensaje_final = "          ".join(mensajes)
mensaje_final = "       ".join(mensajes)
cursor.close()
conn.close()
return mensaje_final
@@ -57,7 +57,7 @@ def api_datos2():
@app.route('/api/footer')
def api_pie():
mensaje = obtener_pie(1)
mensaje = obtener_pie(monitor1, monitor2)
return Response(mensaje, mimetype='text/plain')
if __name__ == '__main__':
+1 -1
View File
@@ -8,7 +8,7 @@
}
.animate-scroll {
animation: scroll 45s linear infinite;
animation: scroll 69s linear infinite;
}
@keyframes blink {
+1
View File
@@ -79,6 +79,7 @@ function actualizarTablas(){
cargarTabla("/api/datos1","turnos1");
cargarTabla("/api/datos2","turnos2");
}
cargarFooter();
actualizarTablas();
setInterval(actualizarTablas, 30000);
+4 -4
View File
@@ -44,17 +44,17 @@
</table>
</div>
</div>
<footer class="w-full h-14 bg-[#008968] flex items-center overflow-hidden">
<!--<footer class="w-full h-14 bg-[#008968] flex items-center overflow-hidden">
<div id="scroll-wrapper" class="whitespace-nowrap absolute w-max animate-scroll text-white text-3xl px-4 flex gap-16">
</div>
</footer>
<!--<footer class="w-full bg-[#008968] overflow-hidden h-14 flex items-center">
</footer>-->
<footer class="w-full bg-[#008968] overflow-hidden h-14 flex items-center">
<div class="scroll-wrapper whitespace-nowrap w-max animate-scroll">
<span id="footer-text" class="text-white text-3xl px-4 "></span>
<span class="spacer w-14 inline-block"></span>
<span id="footer-text-duplicate" class="text-white text-3xl px-4"></span>
</div>
<div id="footer-text" class="whitespace-pre text-3xl animate-scroll whitespace-nowrap px-4 text-white"></div>
</footer>-->
</footer>
</body>
</html>