From 48249d1c82b82b06cc73bb2e026f518610ca349a Mon Sep 17 00:00:00 2001 From: Admin MPCZ Date: Wed, 15 Apr 2026 12:37:49 +0200 Subject: [PATCH] Qualys agents page: bandeau sync en cours + boutons sync desactives + bouton Annuler --- app/routers/qualys.py | 4 ++++ app/templates/qualys_agents.html | 18 ++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/routers/qualys.py b/app/routers/qualys.py index 5a23f4c..7d4bbf7 100644 --- a/app/routers/qualys.py +++ b/app/routers/qualys.py @@ -517,11 +517,15 @@ def qualys_agents_page(request: Request, db=Depends(get_db)): inactive = [{"hostname": r.hostname, "os": r.os, "agent_version": r.agent_version, "last_checkin": r.last_checkin, "etat": r.etat or ""} for r in inactive_rows] + from ..services.qualys_service import is_refresh_running + sync_running = is_refresh_running() + ctx = base_context(request, db, user) ctx.update({ "app_name": APP_NAME, "keys": keys, "summary": summary, "no_agent_servers": no_agent, "inactive_agents": inactive, "msg": request.query_params.get("msg", ""), + "sync_running": sync_running, }) return templates.TemplateResponse("qualys_agents.html", ctx) diff --git a/app/templates/qualys_agents.html b/app/templates/qualys_agents.html index fbdacc7..8574419 100644 --- a/app/templates/qualys_agents.html +++ b/app/templates/qualys_agents.html @@ -7,10 +7,10 @@

Activation keys et versions des agents déployés

- - Déployer @@ -18,6 +18,20 @@
+{% if sync_running %} +
+
+
+ ⏳ Synchronisation Qualys en cours + Les boutons de sync sont désactivés. Les données ci-dessous peuvent être en cours de mise à jour. +
+
+ +
+
+
+{% endif %} +