generated from streamlit/blank-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstreamlit_app.py
91 lines (75 loc) · 2.46 KB
/
streamlit_app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import streamlit as st
from PIL import Image
# Configurer la page
st.set_page_config(layout="wide")
# Ajouter du CSS personnalisé pour un meilleur style
st.markdown(
"""
<style>
body {
background-color: black;
color: white;
}
h1, h2 {
text-align: center;
color: white;
}
.status-table {
margin-left: auto;
margin-right: auto;
width: 50%;
}
.status-table th, .status-table td {
padding: 10px;
text-align: left;
}
.status-table th {
background-color: #333;
}
.status-table td {
background-color: #222;
}
.status-online {
color: #00FF00; /* Vert pour online */
}
.status-offline {
color: #FF0000; /* Rouge pour offline */
}
</style>
""",
unsafe_allow_html=True
)
# Utilisation des colonnes pour le centrage
col1, col2, col3 = st.columns([1, 2, 1])
with col2:
st.markdown("<h1>Status</h1>", unsafe_allow_html=True)
# Status pour MWIII
col1, col2, col3 = st.columns([1, 2, 1])
with col2:
st.markdown("<h2>MWIII</h2>", unsafe_allow_html=True)
# Créer la table de statuts pour MWIII
mwiii_data = [
["KURIBOH CHAIR + WOOFER", "online and safe to use"],
["HANA UA + WOOFER V3", "online (not safe to use)"],
["HANA AIO + WOOFER", "online (not safe for a main)"],
]
st.markdown("<table class='status-table'>", unsafe_allow_html=True)
st.markdown("<tr><th>Loaders</th><th>Status</th></tr>", unsafe_allow_html=True)
for loader, status in mwiii_data:
status_color = "status-online" # Tous les éléments de MWIII sont "online"
st.markdown(f"<tr><td>{loader}</td><td class='{status_color}'>{status}</td></tr>", unsafe_allow_html=True)
st.markdown("</table>", unsafe_allow_html=True)
# Status pour MW2019
col1, col2, col3 = st.columns([1, 2, 1])
with col2:
st.markdown("<h2>MW2019</h2>", unsafe_allow_html=True)
# Créer la table de statuts pour MW2019
mw2019_data = [
["MW19 AIO CHAIR", "offline"],
]
st.markdown("<table class='status-table'>", unsafe_allow_html=True)
st.markdown("<tr><th>Loaders</th><th>Status</th></tr>", unsafe_allow_html=True)
for loader, status in mw2019_data:
status_color = "status-offline" # MW2019 est "offline"
st.markdown(f"<tr><td>{loader}</td><td class='{status_color}'>{status}</td></tr>", unsafe_allow_html=True)
st.markdown("</table>", unsafe_allow_html=True)