Améliorations BO
Build and Push Docker Image / build-and-push (push) Successful in 34s

This commit is contained in:
xavier committed 2026-08-29 11:03:29 +02:00
1 parent 21348c70aa
commit 6a4cc97356
3 files changed
+70 -6

No files matched your search

+16 -4
View File
@@ -153,6 +153,9 @@ def render_main_page(chat_id, utilisateur_nom="xavier", role="Super Admin"):
A("+ Nouvelle discussion", href="/new_chat", cls="new-chat-btn"),
A("💾 Exporter JSON", href="/export_json", target="_blank", cls="export-btn"),
# Bouton d'accès rapide au Back Office (FO -> BO)
A("⚙️ Back Office", href="/backoffice", cls="export-btn", style="background-color: #3f51b5; color: white; border-color: #3f51b5; margin-top: 5px; text-decoration: none; text-align: center; font-weight: bold;"),
# Bouton de recharger les crédits
Button("💳 Recharger des crédits", onclick="document.getElementById('modal-recharge-paypal').style.display='flex'", cls="export-btn", style="background-color: #00e5ff; color: black; border: none; margin-top: 5px; font-weight: bold; cursor: pointer;"),
@@ -316,12 +319,21 @@ def render_backoffice_page(utilisateur, role, tous_les_utilisateurs, stats_serve
style="background: #1a1a1a; padding: 20px; border-radius: 8px; border: 1px solid #333; margin-bottom: 20px;"
))
# Spécificités Super Admin uniquement
# Spécificités Super Admin uniquement (Supervision Système, RAID & Agent Vectoriel + Bouton de Vectorisation Globale)
if role == "Super Admin" and stats_serveur:
data_st = stats_serveur.get('data_stats', {})
sections.append(Div(
H3("🖥️ Supervision Système & Serveur", style="color: #ff9800;"),
P(f"💾 Espace disque utilisé : {stats_serveur['disque_utilise_gb']} Go / {stats_serveur['disque_total_gb']} Go ({stats_serveur['pourcentage_utilise']}%)"),
P(f"📂 Espace libre : {stats_serveur['disque_libre_gb']} Go"),
H3("🖥️ Supervision Système, RAID & Agent Vectoriel", style="color: #ff9800;"),
P(f"💾 Espace disque racine : {stats_serveur['disque_utilise_gb']} Go / {stats_serveur['disque_total_gb']} Go ({stats_serveur['pourcentage_utilise']}%)"),
(P(f"🗄️ Partition RAID (/DATA) : {data_st.get('utilise_gb', 0)} Go / {data_st.get('total_gb', 0)} Go ({data_st.get('pourcentage', 0)}% utilisés, {data_st.get('libre_gb', 0)} Go libres)") if data_st else P("🗄️ Partition RAID (/DATA) : Non montée ou non détectée")),
P(f"📡 État du RAID (mdstat) : {stats_serveur.get('raid_status', 'N/A')}", style="font-size: 0.85em; background: #222; padding: 8px; border-radius: 4px; white-space: pre-wrap;"),
P(f"🤖 Agent Vectoriel (Ollama) : {stats_serveur.get('agent_status', 'N/A')}"),
Hr(style="border-color: #444; margin: 15px 0;"),
H4("⚡ Actions Globales RAG", style="color: #00e5ff; font-size: 1em;"),
Form(
Button("Forcer la vectorisation globale de tout le RAG", type="submit", cls="btn-submit", style="background-color: #e91e63; color: white; width: 100%; font-weight: bold; cursor: pointer;"),
method="post", action="/backoffice/forcer_vectorisation"
),
style="background: #1a1a1a; padding: 20px; border-radius: 8px; border: 1px solid #333;"
))