From d2353aaf881480ea82a056e6bb3e310d120c7489 Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Wed, 17 Feb 2021 18:23:00 +0100
Subject: [PATCH] ### 0.0.17 Release * Fixed #123 split RkiBundeslaenderService
 into two Services, one for bundeslaender and one for landkreise * Fixed #128
 add fields from csv to RkiLandkreiseImport * Fixed #139 refactor
 RkiBundeslaenderServiceDownload to new method scheme introduced 07.02.2021 *
 Fixed #140 move WhoImport to RKI in: rk_service_import.py * Fixed #125
 implement RkiLandkreise * Fixed #126 implement RkiBundeslaenderImport

### 0.0.18 Release
* Fixed #39 SQLalchemy instead of SQL: AllModelClasses.remove_all()
* Fixed #40 SQLalchemy instead of SQL: EcdcImport.get_date_rep()
* Fixed #41 SQLalchemy instead of SQL: EcdcImport.get_countries_of_continent()
* Fixed #107 SQLalchemy instead of SQL in: EcdcImport.get_countries_of_continent
* Fixed #109 SQLalchemy instead of SQL in: EcdcImport.get_date_rep
* Fixed #110 SQLalchemy instead of SQL in: EcdcImport.get_continent
---
 src/covid19/blueprints/admin/admin_views.py      | 16 ++++++++++++++++
 .../admin/templates/admin/admin_tasks.html       |  7 +++++--
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/covid19/blueprints/admin/admin_views.py b/src/covid19/blueprints/admin/admin_views.py
index 38911c46..b5188c88 100644
--- a/src/covid19/blueprints/admin/admin_views.py
+++ b/src/covid19/blueprints/admin/admin_views.py
@@ -139,3 +139,19 @@ def url_admin_download_all_files():
     flash("who_service.download_all_files Done")
     app.logger.info("url_admin_download_all_files [done]")
     return redirect(url_for('app_admin.url_admin_tasks'))
+
+
+@app_admin.route('/import/all')
+def url_admin_import_all_files():
+    who_service.download_all_files()
+    flash("who_service.download_all_files Done")
+    ecdc_service.download_all_files()
+    flash("who_service.download_all_files Done")
+    rki_vaccination_service.download_all_files()
+    flash("who_service.download_all_files Done")
+    rki_service_bundeslaender.download_all_files()
+    flash("who_service.download_all_files Done")
+    rki_service_landkreise.download_all_files()
+    flash("who_service.download_all_files Done")
+    app.logger.info("url_admin_download_all_files [done]")
+    return redirect(url_for('app_admin.url_admin_tasks'))
diff --git a/src/covid19/blueprints/admin/templates/admin/admin_tasks.html b/src/covid19/blueprints/admin/templates/admin/admin_tasks.html
index 930a7cbe..91458175 100644
--- a/src/covid19/blueprints/admin/templates/admin/admin_tasks.html
+++ b/src/covid19/blueprints/admin/templates/admin/admin_tasks.html
@@ -11,7 +11,7 @@
                     <a class="btn btn-secondary btn-lg btn-block text-left"
                        href="{{ url_for( 'app_admin.url_alive_message_start') }}"
                        role="button">Admin :: alive message</a>
-                    <a class="btn btn-primary btn-lg btn-block text-left"
+                    <a class="btn btn-success btn-lg btn-block text-left"
                        href="{{ url_for( 'app_admin.url_admin_database_drop') }}"
                        role="button">Admin :: database :: drop_create</a>
                     <a class="btn btn-primary btn-lg btn-block text-left"
@@ -23,9 +23,12 @@
                     <a class="btn btn-primary btn-lg btn-block text-left"
                        href="{{ url_for( 'app_admin.url_admin_database_dump') }}"
                        role="button">Admin :: database :: dump</a>
-                    <a class="btn btn-primary btn-lg btn-block text-left"
+                    <a class="btn btn-warning btn-lg btn-block text-left"
                        href="{{ url_for( 'app_admin.url_admin_download_all_files') }}"
                        role="button">Admin :: url_admin_download_all_files </a>
+                    <a class="btn btn-info btn-lg btn-block text-left"
+                       href="{{ url_for( 'app_admin.url_admin_import_all_files') }}"
+                       role="button">Admin :: url_admin_import_all_files </a>
                 </div>
             </div>
         </div>
-- 
GitLab