-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
37 lines (27 loc) · 1.08 KB
/
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
from extentions.get_data import Database
from streamlit_navigation_bar import st_navbar
import pages as pg
import streamlit as st
st.set_page_config(page_title="Dashboard Monitoring", layout='wide', initial_sidebar_state='collapsed')
page = st_navbar(["Dashboard","Statistik GE", "Statistik 4 Modul", "Statistik 32 Modul", "Manajemen Perangkat"],
options={'show_menu':False, 'show_sidebar':False})
def main(database: Database):
if page == "Dashboard":
pg.home_page(database)
if page == "Statistik GE":
pg.ge_page(database)
elif page == "Statistik 4 Modul":
pg.vbm_page(database)
elif page == "Statistik 32 Modul":
pg.sg_page(database)
elif page == "Manajemen Perangkat":
pg.perangkat_page(database)
def check_asr(database: Database):
if 'asr_value' not in st.session_state:
asr_value = database.get_asr_from_db()
st.session_state['asr_value'] = asr_value
return st.session_state['asr_value']
if __name__ == "__main__":
database = Database()
check_asr(database)
main(database)