Actualiser domo91.py

This commit is contained in:
2025-04-25 13:05:44 +00:00
parent f352833434
commit 0329bf0e45

View File

@@ -123,11 +123,7 @@ if "lieu_autorise" not in st.session_state:
st.session_state["lieu_autorise"] = None
# --- Connexion utilisateur dans la sidebar ---
<<<<<<< HEAD
st.sidebar.header("🔐 Connexion")
=======
st.sidebar.header("🔐 Connexion")
>>>>>>> origin/develop
if not st.session_state.get("authenticated"):
login = st.sidebar.text_input("Nom d'utilisateur")
password = st.sidebar.text_input("Mot de passe", type="password")
@@ -274,12 +270,10 @@ if st.session_state["authenticated"]:
# --- NAVIGATION ---
if st.session_state["role"] == "superviseur":
onglet = st.sidebar.radio("📁 Navigation", ["Accueil", "Statistiques", "Traffic"])
# --- ONGLET ACCUEIL ---
else:
onglet = "Accueil"
>>>>>>> origin/develop
if onglet == "Accueil":
st.markdown("## Sélection du site et de la date")
try:
@@ -359,11 +353,7 @@ if st.session_state["authenticated"]:
except Exception as e:
st.error(f"Erreur MySQL : {e}")
<<<<<<< HEAD
=======
# ---- ONGLET STATISTIQUES ---
>>>>>>> origin/develop
elif onglet == "Statistiques":
st.markdown("## 📈 Statistiques de température")
try:
@@ -494,11 +484,6 @@ if st.session_state["authenticated"]:
except Exception as e:
st.error(f"Erreur SQL (admin) : {e}")
<<<<<<< HEAD
except exception as err:
st.error(f"Erreur MySQL : {err}")
=======
# --- ONGLET TRAFFIC ------
elif onglet == "Traffic":
@@ -521,5 +506,4 @@ if st.session_state["authenticated"]:
st.error(f"Erreur chargement des connexions : {e}")
except exception as err:
st.error(f"Erreur MySQL : {err}")
>>>>>>> origin/develop
st.error(f"Erreur MySQL : {err}")