Skip to content

Commit

Permalink
feat: external management flags in CRUD (#19318)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9766726)
  • Loading branch information
betodealmeida authored and villebro committed Apr 3, 2022
1 parent a81b1ab commit 3b0b60c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions superset/charts/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ class ChartPostSchema(Schema):
certification_details = fields.String(
description=certification_details_description, allow_none=True
)
is_managed_externally = fields.Boolean(allow_none=True, default=False)
external_url = fields.String(allow_none=True)


class ChartPutSchema(Schema):
Expand Down Expand Up @@ -251,6 +253,8 @@ class ChartPutSchema(Schema):
certification_details = fields.String(
description=certification_details_description, allow_none=True
)
is_managed_externally = fields.Boolean(allow_none=True, default=False)
external_url = fields.String(allow_none=True)


class ChartGetDatasourceObjectDataResponseSchema(Schema):
Expand Down
4 changes: 4 additions & 0 deletions superset/dashboards/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ class DashboardPostSchema(BaseDashboardSchema):
certification_details = fields.String(
description=certification_details_description, allow_none=True
)
is_managed_externally = fields.Boolean(allow_none=True, default=False)
external_url = fields.String(allow_none=True)


class DashboardPutSchema(BaseDashboardSchema):
Expand Down Expand Up @@ -278,6 +280,8 @@ class DashboardPutSchema(BaseDashboardSchema):
certification_details = fields.String(
description=certification_details_description, allow_none=True
)
is_managed_externally = fields.Boolean(allow_none=True, default=False)
external_url = fields.String(allow_none=True)


class ChartFavStarResponseResult(Schema):
Expand Down
4 changes: 4 additions & 0 deletions superset/databases/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ class Meta: # pylint: disable=too-few-public-methods
description=sqlalchemy_uri_description,
validate=[Length(1, 1024), sqlalchemy_uri_validator],
)
is_managed_externally = fields.Boolean(allow_none=True, default=False)
external_url = fields.String(allow_none=True)


class DatabasePutSchema(Schema, DatabaseParametersSchemaMixin):
Expand Down Expand Up @@ -428,6 +430,8 @@ class Meta: # pylint: disable=too-few-public-methods
description=sqlalchemy_uri_description,
validate=[Length(0, 1024), sqlalchemy_uri_validator],
)
is_managed_externally = fields.Boolean(allow_none=True, default=False)
external_url = fields.String(allow_none=True)


class DatabaseTestConnectionSchema(Schema, DatabaseParametersSchemaMixin):
Expand Down
4 changes: 4 additions & 0 deletions superset/datasets/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class DatasetPostSchema(Schema):
schema = fields.String(validate=Length(0, 250))
table_name = fields.String(required=True, allow_none=False, validate=Length(1, 250))
owners = fields.List(fields.Integer())
is_managed_externally = fields.Boolean(allow_none=True, default=False)
external_url = fields.String(allow_none=True)


class DatasetPutSchema(Schema):
Expand All @@ -100,6 +102,8 @@ class DatasetPutSchema(Schema):
columns = fields.List(fields.Nested(DatasetColumnsPutSchema))
metrics = fields.List(fields.Nested(DatasetMetricsPutSchema))
extra = fields.String(allow_none=True)
is_managed_externally = fields.Boolean(allow_none=True, default=False)
external_url = fields.String(allow_none=True)


class DatasetRelatedChart(Schema):
Expand Down

0 comments on commit 3b0b60c

Please sign in to comment.