diff --git a/src/app.rs b/src/app.rs index ae38233..2277705 100644 --- a/src/app.rs +++ b/src/app.rs @@ -72,20 +72,6 @@ impl eframe::App for TwoDBApp { ui.menu_button("Update", |ui| { self.render_clean_tables_button(ui); self.render_get_empty_tables_button(ui); - - if ui.button("Get Clean Tables for Target").clicked() { - let database_name = var("POSTGRES_DB_TARGET").unwrap_or(String::from("")); - get_clean_tables(&database_name); - let text = format!("Done Get Clean Tables for {}", database_name); - toasts.add(Toast { - text: text.into(), - kind: ToastKind::Success, - options: ToastOptions::default() - .duration_in_seconds(5.0) - .show_progress(true), - ..Default::default() - }); - } }); if self.is_busy.eq(&true) { diff --git a/src/get_clean_tables_button.rs b/src/get_clean_tables_button.rs index f52e96a..d68585d 100644 --- a/src/get_clean_tables_button.rs +++ b/src/get_clean_tables_button.rs @@ -22,13 +22,13 @@ impl TwoDBApp { .anchor(Align2::RIGHT_BOTTOM, (-10.0, -10.0)) // 10 units from the bottom right corner .direction(egui::Direction::BottomUp); - let database_name = var("POSTGRES_DB_SOURCE").unwrap_or(String::from("")); - get_clean_tables(&database_name); + let database_name_source = var("POSTGRES_DB_SOURCE").unwrap_or(String::from("")); + get_clean_tables(&database_name_source); - let database_name = var("POSTGRES_DB_TARGET").unwrap_or(String::from("")); - get_clean_tables(&database_name); + let database_name_target = var("POSTGRES_DB_TARGET").unwrap_or(String::from("")); + get_clean_tables(&database_name_target); - let text = format!("Done Get Clean Tables for {}", database_name); + let text = format!("Done Get Clean Tables for {} and {}", database_name_source, database_name_target); thread_toasts.add(Toast { text: text.into(), kind: ToastKind::Success,