Skip to content

Commit

Permalink
chore(dashboard import/export): include additional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitor-Avila committed Aug 9, 2023
1 parent ec9e9a4 commit 3c61ea8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions superset/dashboards/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 3 additions & 0 deletions superset/models/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
6 changes: 6 additions & 0 deletions tests/integration_tests/dashboards/commands_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def test_export_dashboard_command(self, mock_g1, mock_g2):
"description": None,
"css": None,
"slug": "world_health",
"certified_by": None,
"certification_details": None,
"published": False,
"uuid": str(example_dashboard.uuid),
"position": {
"CHART-36bfc934": {
Expand Down Expand Up @@ -279,6 +282,9 @@ def test_export_dashboard_command_key_order(self, mock_g1, mock_g2):
"description",
"css",
"slug",
"certified_by",
"certification_details",
"published",
"uuid",
"position",
"metadata",
Expand Down

0 comments on commit 3c61ea8

Please sign in to comment.