From 8d99cac89364f6b77991698dbcd6491871116314 Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Mon, 10 Oct 2022 14:58:34 +0100 Subject: [PATCH 1/2] fix: database schema selector on import data --- .../columnar_to_database_view/edit.html | 43 +-------------- .../form_view/csv_to_database_view/edit.html | 43 +-------------- .../form_view/database_schemas_selector.html | 52 +++++++++++++++++++ .../excel_to_database_view/edit.html | 43 +-------------- 4 files changed, 58 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 2371554edf43e..2bec3aa12abb1 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 57e5f70c103dc..2bec3aa12abb1 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 0000000000000..bfec93ee433b6 --- /dev/null +++ b/superset/templates/superset/form_view/database_schemas_selector.html @@ -0,0 +1,52 @@ + 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 b44346aaae9b1..2bec3aa12abb1 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 %} From 956ad440cf8d18e7b74407510572e3de82c5f6af Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Mon, 10 Oct 2022 15:30:27 +0100 Subject: [PATCH 2/2] add missing license --- .../form_view/database_schemas_selector.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/superset/templates/superset/form_view/database_schemas_selector.html b/superset/templates/superset/form_view/database_schemas_selector.html index bfec93ee433b6..73955d0174e6c 100644 --- a/superset/templates/superset/form_view/database_schemas_selector.html +++ b/superset/templates/superset/form_view/database_schemas_selector.html @@ -1,3 +1,21 @@ +{# +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. +#}