DavMelchi commited on
Commit
ae5e7a8
·
1 Parent(s): bb3e08f

Button reordering for UI/UX

Browse files
Files changed (1) hide show
  1. apps/database_page.py +28 -21
apps/database_page.py CHANGED
@@ -98,17 +98,31 @@ if uploaded_file is not None:
98
  "neighbors": ["ADCE", "ADJS", "ADJI", "ADJG", "ADJW", "BTS", "WCEL"],
99
  "trx": ["TRX", "BTS"],
100
  "mrbts": ["MRBTS"],
 
101
  """
102
  )
103
 
104
- if Technology.gsm == True:
 
 
 
 
 
 
 
105
  with col1:
 
 
 
 
 
 
106
  st.button(
107
  "Generate 2G DB",
108
  on_click=lambda: process_database(process_gsm_data_to_excel, "2G"),
109
  )
110
  if Technology.wcdma == True:
111
- with col2:
112
  st.button(
113
  "Generate 3G DB",
114
  on_click=lambda: process_database(
@@ -116,28 +130,13 @@ if uploaded_file is not None:
116
  ),
117
  )
118
  if Technology.lte == True:
119
- with col3:
120
  st.button(
121
  "Generate LTE DB",
122
  on_click=lambda: process_database(process_lte_data_to_excel, "LTE"),
123
  )
124
- if Technology.gsm == True or Technology.wcdma == True or Technology.lte == True:
125
- with col4:
126
- st.button(
127
- "Generate All DBs",
128
- on_click=lambda: execute_process_all_tech_db(uploaded_file),
129
- )
130
- if Technology.neighbors == True:
131
- with col5:
132
- st.button(
133
- "Generate NEI DB",
134
- on_click=lambda: process_database(
135
- process_neighbors_data_to_excel, "NEI"
136
- ),
137
- # on_click=lambda: process_neighbors_data(uploaded_file),
138
- )
139
  if Technology.trx == True:
140
- with col6:
141
  st.button(
142
  "Generate TRX DB",
143
  on_click=lambda: process_database(
@@ -145,7 +144,7 @@ if uploaded_file is not None:
145
  ),
146
  )
147
  if Technology.mrbts == True:
148
- with col7:
149
  st.button(
150
  "Generate MRBTS",
151
  on_click=lambda: process_database(
@@ -154,10 +153,18 @@ if uploaded_file is not None:
154
  )
155
 
156
  if Technology.mal == True:
157
- with col8:
158
  st.button(
159
  "Generate MAL",
160
  on_click=lambda: process_database(process_mal_data_to_excel, "MAL"),
161
  )
 
 
 
 
 
 
 
 
162
  except Exception as e:
163
  st.error(f"Error: {e}")
 
98
  "neighbors": ["ADCE", "ADJS", "ADJI", "ADJG", "ADJW", "BTS", "WCEL"],
99
  "trx": ["TRX", "BTS"],
100
  "mrbts": ["MRBTS"],
101
+ "mal": ["MAL"],
102
  """
103
  )
104
 
105
+ if (
106
+ Technology.gsm == True
107
+ and Technology.wcdma == True
108
+ and Technology.lte == True
109
+ and Technology.trx == True
110
+ and Technology.mrbts == True
111
+ and Technology.mal == True
112
+ ):
113
  with col1:
114
+ st.button(
115
+ "Generate All DBs",
116
+ on_click=lambda: execute_process_all_tech_db(uploaded_file),
117
+ )
118
+ if Technology.gsm == True:
119
+ with col2:
120
  st.button(
121
  "Generate 2G DB",
122
  on_click=lambda: process_database(process_gsm_data_to_excel, "2G"),
123
  )
124
  if Technology.wcdma == True:
125
+ with col3:
126
  st.button(
127
  "Generate 3G DB",
128
  on_click=lambda: process_database(
 
130
  ),
131
  )
132
  if Technology.lte == True:
133
+ with col4:
134
  st.button(
135
  "Generate LTE DB",
136
  on_click=lambda: process_database(process_lte_data_to_excel, "LTE"),
137
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  if Technology.trx == True:
139
+ with col5:
140
  st.button(
141
  "Generate TRX DB",
142
  on_click=lambda: process_database(
 
144
  ),
145
  )
146
  if Technology.mrbts == True:
147
+ with col6:
148
  st.button(
149
  "Generate MRBTS",
150
  on_click=lambda: process_database(
 
153
  )
154
 
155
  if Technology.mal == True:
156
+ with col7:
157
  st.button(
158
  "Generate MAL",
159
  on_click=lambda: process_database(process_mal_data_to_excel, "MAL"),
160
  )
161
+ if Technology.neighbors == True:
162
+ with col8:
163
+ st.button(
164
+ "Generate NEI DB",
165
+ on_click=lambda: process_database(
166
+ process_neighbors_data_to_excel, "NEI"
167
+ ),
168
+ )
169
  except Exception as e:
170
  st.error(f"Error: {e}")