Fix Update: Habilito el pie para que muestre los pies de los dos monitores
This commit is contained in:
@@ -25,15 +25,15 @@ def obtener_turnos(mon_id):
|
|||||||
print(f"Error al conectar: {e}")
|
print(f"Error al conectar: {e}")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def obtener_pie(mon_id):
|
def obtener_pie(mon_id1, mon_id2):
|
||||||
conn = get_connection()
|
conn = get_connection()
|
||||||
if not conn:
|
if not conn:
|
||||||
return []
|
return []
|
||||||
try:
|
try:
|
||||||
cursor = conn.cursor()
|
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()]
|
mensajes = [fila[0] for fila in cursor.fetchall()]
|
||||||
mensaje_final = " ".join(mensajes)
|
mensaje_final = " ".join(mensajes)
|
||||||
cursor.close()
|
cursor.close()
|
||||||
conn.close()
|
conn.close()
|
||||||
return mensaje_final
|
return mensaje_final
|
||||||
@@ -57,7 +57,7 @@ def api_datos2():
|
|||||||
|
|
||||||
@app.route('/api/footer')
|
@app.route('/api/footer')
|
||||||
def api_pie():
|
def api_pie():
|
||||||
mensaje = obtener_pie(1)
|
mensaje = obtener_pie(monitor1, monitor2)
|
||||||
return Response(mensaje, mimetype='text/plain')
|
return Response(mensaje, mimetype='text/plain')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.animate-scroll {
|
.animate-scroll {
|
||||||
animation: scroll 45s linear infinite;
|
animation: scroll 69s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes blink {
|
@keyframes blink {
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ function actualizarTablas(){
|
|||||||
cargarTabla("/api/datos1","turnos1");
|
cargarTabla("/api/datos1","turnos1");
|
||||||
cargarTabla("/api/datos2","turnos2");
|
cargarTabla("/api/datos2","turnos2");
|
||||||
}
|
}
|
||||||
|
|
||||||
cargarFooter();
|
cargarFooter();
|
||||||
actualizarTablas();
|
actualizarTablas();
|
||||||
setInterval(actualizarTablas, 30000);
|
setInterval(actualizarTablas, 30000);
|
||||||
|
|||||||
@@ -44,17 +44,17 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</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 id="scroll-wrapper" class="whitespace-nowrap absolute w-max animate-scroll text-white text-3xl px-4 flex gap-16">
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>-->
|
||||||
<!--<footer class="w-full bg-[#008968] overflow-hidden h-14 flex items-center">
|
<footer class="w-full bg-[#008968] overflow-hidden h-14 flex items-center">
|
||||||
<div class="scroll-wrapper whitespace-nowrap w-max animate-scroll">
|
<div class="scroll-wrapper whitespace-nowrap w-max animate-scroll">
|
||||||
<span id="footer-text" class="text-white text-3xl px-4 "></span>
|
<span id="footer-text" class="text-white text-3xl px-4 "></span>
|
||||||
<span class="spacer w-14 inline-block"></span>
|
<span class="spacer w-14 inline-block"></span>
|
||||||
<span id="footer-text-duplicate" class="text-white text-3xl px-4"></span>
|
<span id="footer-text-duplicate" class="text-white text-3xl px-4"></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer-text" class="whitespace-pre text-3xl animate-scroll whitespace-nowrap px-4 text-white"></div>
|
<div id="footer-text" class="whitespace-pre text-3xl animate-scroll whitespace-nowrap px-4 text-white"></div>
|
||||||
</footer>-->
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user