Skip to content

Commit

Permalink
feat: external management flags in CRUD (apache#19318)
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida authored and philipher29 committed Jun 9, 2022
1 parent 854e7b4 commit dc31620
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 @@ -209,6 +209,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 @@ -250,6 +252,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 dc31620

Please sign in to comment.