Skip to content

Commit

Permalink
Merge pull request #60 from whdalsrnt/master
Browse files Browse the repository at this point in the history
feat: add size field to widget model
  • Loading branch information
whdalsrnt authored Jun 12, 2024
2 parents 4890d49 + ac806b2 commit b235cdd
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/spaceone/dashboard/model/private_widget/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class PrivateWidget(MongoModel):
name = StringField(max_length=100)
description = StringField(default=None)
widget_type = StringField(max_length=40, default="NONE")
size = StringField(default=None, null=True)
options = DictField(default=None, null=True)
tags = DictField(default=None)
data_table_id = StringField(max_length=40, default=None, null=True)
Expand All @@ -22,6 +23,7 @@ class PrivateWidget(MongoModel):
"name",
"description",
"widget_type",
"size",
"options",
"tags",
"data_table_id",
Expand Down
2 changes: 2 additions & 0 deletions src/spaceone/dashboard/model/private_widget/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class PrivateWidgetCreateRequest(BaseModel):
name: Union[str, None] = None
description: Union[str, None] = None
widget_type: Union[str, None] = None
size: Union[str, None] = None
options: Union[dict, None] = None
tags: Union[dict, None] = None
user_id: str
Expand All @@ -27,6 +28,7 @@ class PrivateWidgetUpdateRequest(BaseModel):
name: Union[str, None] = None
description: Union[str, None] = None
widget_type: Union[str, None] = None
size: Union[str, None] = None
options: Union[dict, None] = None
data_table_id: Union[str, None] = None
tags: Union[dict, None] = None
Expand Down
1 change: 1 addition & 0 deletions src/spaceone/dashboard/model/private_widget/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class PrivateWidgetResponse(BaseModel):
name: Union[str, None] = None
description: Union[str, None] = None
widget_type: Union[str, None] = None
size: Union[str, None] = None
options: Union[dict, None] = None
tags: Union[dict, None] = None
data_table_id: Union[str, None] = None
Expand Down
2 changes: 2 additions & 0 deletions src/spaceone/dashboard/model/public_widget/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class PublicWidget(MongoModel):
name = StringField(max_length=100)
description = StringField(default=None)
widget_type = StringField(max_length=40, default="NONE")
size = StringField(default=None, null=True)
options = DictField(default=None, null=True)
tags = DictField(default=None)
data_table_id = StringField(max_length=40, default=None, null=True)
Expand All @@ -26,6 +27,7 @@ class PublicWidget(MongoModel):
"name",
"description",
"widget_type",
"size",
"options",
"tags",
"data_table_id",
Expand Down
2 changes: 2 additions & 0 deletions src/spaceone/dashboard/model/public_widget/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class PublicWidgetCreateRequest(BaseModel):
name: Union[str, None] = None
description: Union[str, None] = None
widget_type: Union[str, None] = None
size: Union[str, None] = None
options: Union[dict, None] = None
tags: Union[dict, None] = None
workspace_id: Union[str, None] = None
Expand All @@ -28,6 +29,7 @@ class PublicWidgetUpdateRequest(BaseModel):
name: Union[str, None] = None
description: Union[str, None] = None
widget_type: Union[str, None] = None
size: Union[str, None] = None
options: Union[dict, None] = None
data_table_id: Union[str, None] = None
tags: Union[dict, None] = None
Expand Down
1 change: 1 addition & 0 deletions src/spaceone/dashboard/model/public_widget/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class PublicWidgetResponse(BaseModel):
name: Union[str, None] = None
description: Union[str, None] = None
widget_type: Union[str, None] = None
size: Union[str, None] = None
options: Union[dict, None] = None
tags: Union[dict, None] = None
data_table_id: Union[str, None] = None
Expand Down
2 changes: 2 additions & 0 deletions src/spaceone/dashboard/service/private_widget_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def create(
'name': 'str',
'description': 'str',
'widget_type': 'str',
'size': 'str',
'options': 'dict',
'tags': 'dict',
'user_id': 'str', # injected from auth (required)
Expand Down Expand Up @@ -87,6 +88,7 @@ def update(
'name': 'str',
'description': 'str',
'widget_type': 'str',
'size': 'str',
'options': 'dict',
'data_table_id': 'str',
'tags': 'dict',
Expand Down
2 changes: 2 additions & 0 deletions src/spaceone/dashboard/service/public_widget_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def create(
'name': 'str',
'description': 'str',
'widget_type': 'str',
'size': 'str',
'options': 'dict',
'tags': 'dict',
'workspace_id': 'str', # injected from auth
Expand Down Expand Up @@ -88,6 +89,7 @@ def update(
'name': 'str',
'description': 'str',
'widget_type': 'str',
'size': 'str',
'options': 'dict',
'data_table_id': 'str',
'tags': 'dict',
Expand Down

0 comments on commit b235cdd

Please sign in to comment.