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