prevent page rerun after download
Browse files- apps/database_page.py +28 -3
apps/database_page.py
CHANGED
@@ -33,6 +33,7 @@ def process_database(process_func, database_type):
|
|
33 |
download_button(database_type)
|
34 |
|
35 |
|
|
|
36 |
def download_button(database_type):
|
37 |
if database_type == "2G":
|
38 |
data = UtilsVars.final_gsm_database
|
@@ -78,10 +79,15 @@ def execute_process_all_tech_db(uploaded_file):
|
|
78 |
download_button("All")
|
79 |
|
80 |
|
81 |
-
def execute_process_all_tech_db_with_stats(uploaded_file):
|
|
|
|
|
82 |
if uploaded_file is not None:
|
83 |
start_time = time.time()
|
84 |
-
process_all_tech_db_with_stats(
|
|
|
|
|
|
|
85 |
execution_time = time.time() - start_time
|
86 |
st.write(
|
87 |
f"All databases are generated. Execution time: {execution_time:.2f} seconds"
|
@@ -189,6 +195,25 @@ if uploaded_file is not None:
|
|
189 |
|
190 |
if uploaded_file is not None:
|
191 |
if DumpType.full_dump == True:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
if st.button("Generate All DBs and Show Stats"):
|
193 |
-
|
|
|
|
|
|
|
|
|
194 |
dump_analysis_space()
|
|
|
33 |
download_button(database_type)
|
34 |
|
35 |
|
36 |
+
@st.fragment()
|
37 |
def download_button(database_type):
|
38 |
if database_type == "2G":
|
39 |
data = UtilsVars.final_gsm_database
|
|
|
79 |
download_button("All")
|
80 |
|
81 |
|
82 |
+
# def execute_process_all_tech_db_with_stats(uploaded_file: str, region_list: list):
|
83 |
+
def execute_process_all_tech_db_with_stats(uploaded_file: str):
|
84 |
+
|
85 |
if uploaded_file is not None:
|
86 |
start_time = time.time()
|
87 |
+
process_all_tech_db_with_stats(
|
88 |
+
uploaded_file,
|
89 |
+
# region_list
|
90 |
+
)
|
91 |
execution_time = time.time() - start_time
|
92 |
st.write(
|
93 |
f"All databases are generated. Execution time: {execution_time:.2f} seconds"
|
|
|
195 |
|
196 |
if uploaded_file is not None:
|
197 |
if DumpType.full_dump == True:
|
198 |
+
# regions = st.multiselect(
|
199 |
+
# "Select the region(s) you want to analyze",
|
200 |
+
# ["Test BTS", "SKS", "SEG", "TBC", "KDL", "KKO", "GAO", "MPT", "KYS"],
|
201 |
+
# default=[
|
202 |
+
# "Test BTS",
|
203 |
+
# "SKS",
|
204 |
+
# "SEG",
|
205 |
+
# "TBC",
|
206 |
+
# "KDL",
|
207 |
+
# "KKO",
|
208 |
+
# "GAO",
|
209 |
+
# "MPT",
|
210 |
+
# "KYS",
|
211 |
+
# ],
|
212 |
+
# )
|
213 |
if st.button("Generate All DBs and Show Stats"):
|
214 |
+
# if regions:
|
215 |
+
execute_process_all_tech_db_with_stats(
|
216 |
+
uploaded_file,
|
217 |
+
# regions
|
218 |
+
)
|
219 |
dump_analysis_space()
|