From 91f0de0c5dc81b1d644265c829d3b486fc1ba951 Mon Sep 17 00:00:00 2001 From: Daniel Vaz Gaspar Date: Mon, 10 Oct 2022 17:56:31 +0100 Subject: [PATCH] fix: database schema selector on import data (#21759) --- .../columnar_to_database_view/edit.html | 43 +----------- .../form_view/csv_to_database_view/edit.html | 43 +----------- .../form_view/database_schemas_selector.html | 70 +++++++++++++++++++ .../excel_to_database_view/edit.html | 43 +----------- 4 files changed, 76 insertions(+), 123 deletions(-) create mode 100644 superset/templates/superset/form_view/database_schemas_selector.html diff --git a/superset/templates/superset/form_view/columnar_to_database_view/edit.html b/superset/templates/superset/form_view/columnar_to_database_view/edit.html index 2371554edf..2bec3aa12a 100644 --- a/superset/templates/superset/form_view/columnar_to_database_view/edit.html +++ b/superset/templates/superset/form_view/columnar_to_database_view/edit.html @@ -16,49 +16,10 @@ specific language governing permissions and limitations under the License. #} +{% import 'superset/form_view/database_schemas_selector.html' as schemas_selector %} {% extends 'appbuilder/general/model/edit.html' %} {% block tail_js %} {{ super() }} - + {{ schemas_selector }} {% endblock %} diff --git a/superset/templates/superset/form_view/csv_to_database_view/edit.html b/superset/templates/superset/form_view/csv_to_database_view/edit.html index 57e5f70c10..2bec3aa12a 100644 --- a/superset/templates/superset/form_view/csv_to_database_view/edit.html +++ b/superset/templates/superset/form_view/csv_to_database_view/edit.html @@ -16,49 +16,10 @@ specific language governing permissions and limitations under the License. #} +{% import 'superset/form_view/database_schemas_selector.html' as schemas_selector %} {% extends 'appbuilder/general/model/edit.html' %} {% block tail_js %} {{ super() }} - + {{ schemas_selector }} {% endblock %} diff --git a/superset/templates/superset/form_view/database_schemas_selector.html b/superset/templates/superset/form_view/database_schemas_selector.html new file mode 100644 index 0000000000..73955d0174 --- /dev/null +++ b/superset/templates/superset/form_view/database_schemas_selector.html @@ -0,0 +1,70 @@ +{# +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +#} + diff --git a/superset/templates/superset/form_view/excel_to_database_view/edit.html b/superset/templates/superset/form_view/excel_to_database_view/edit.html index b44346aaae..2bec3aa12a 100644 --- a/superset/templates/superset/form_view/excel_to_database_view/edit.html +++ b/superset/templates/superset/form_view/excel_to_database_view/edit.html @@ -16,49 +16,10 @@ specific language governing permissions and limitations under the License. #} +{% import 'superset/form_view/database_schemas_selector.html' as schemas_selector %} {% extends 'appbuilder/general/model/edit.html' %} {% block tail_js %} {{ super() }} - + {{ schemas_selector }} {% endblock %}