You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2023/08/14 20:50:38 UTC
[superset] branch master updated: chore(dashboard import/export): include additional fields to export/import commands (#24941)
This is an automated email from the ASF dual-hosted git repository.
beto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new cacad56172 chore(dashboard import/export): include additional fields to export/import commands (#24941)
cacad56172 is described below
commit cacad56172225351f3c22a488aac839575f688dc
Author: Vitor Avila <96...@users.noreply.github.com>
AuthorDate: Mon Aug 14 17:50:31 2023 -0300
chore(dashboard import/export): include additional fields to export/import commands (#24941)
---
superset/dashboards/schemas.py | 3 +++
superset/models/dashboard.py | 3 +++
tests/integration_tests/dashboards/commands_tests.py | 6 ++++++
tests/integration_tests/import_export_tests.py | 1 +
4 files changed, 13 insertions(+)
diff --git a/superset/dashboards/schemas.py b/superset/dashboards/schemas.py
index b5a12737ad..9054af6da8 100644
--- a/superset/dashboards/schemas.py
+++ b/superset/dashboards/schemas.py
@@ -374,6 +374,9 @@ class ImportV1DashboardSchema(Schema):
version = fields.String(required=True)
is_managed_externally = fields.Boolean(allow_none=True, dump_default=False)
external_url = fields.String(allow_none=True)
+ certified_by = fields.String(allow_none=True)
+ certification_details = fields.String(allow_none=True)
+ published = fields.Boolean(allow_none=True)
class EmbeddedDashboardConfigSchema(Schema):
diff --git a/superset/models/dashboard.py b/superset/models/dashboard.py
index f837c76610..f17e164822 100644
--- a/superset/models/dashboard.py
+++ b/superset/models/dashboard.py
@@ -178,6 +178,9 @@ class Dashboard(Model, AuditMixinNullable, ImportExportMixin):
"description",
"css",
"slug",
+ "certified_by",
+ "certification_details",
+ "published",
]
extra_import_fields = ["is_managed_externally", "external_url"]
diff --git a/tests/integration_tests/dashboards/commands_tests.py b/tests/integration_tests/dashboards/commands_tests.py
index 7106a978c4..75bdd17bcf 100644
--- a/tests/integration_tests/dashboards/commands_tests.py
+++ b/tests/integration_tests/dashboards/commands_tests.py
@@ -92,6 +92,9 @@ class TestExportDashboardsCommand(SupersetTestCase):
"description": None,
"css": None,
"slug": "world_health",
+ "certified_by": None,
+ "certification_details": None,
+ "published": False,
"uuid": str(example_dashboard.uuid),
"position": {
"CHART-36bfc934": {
@@ -279,6 +282,9 @@ class TestExportDashboardsCommand(SupersetTestCase):
"description",
"css",
"slug",
+ "certified_by",
+ "certification_details",
+ "published",
"uuid",
"position",
"metadata",
diff --git a/tests/integration_tests/import_export_tests.py b/tests/integration_tests/import_export_tests.py
index d44745377f..4c7f2477c9 100644
--- a/tests/integration_tests/import_export_tests.py
+++ b/tests/integration_tests/import_export_tests.py
@@ -117,6 +117,7 @@ class TestImportExport(SupersetTestCase):
position_json='{"size_y": 2, "size_x": 2}',
slug=f"{title.lower()}_imported",
json_metadata=json.dumps(json_metadata),
+ published=False,
)
def create_table(self, name, schema=None, id=0, cols_names=[], metric_names=[]):