Skip to content

Commit

Permalink
Merge pull request #1039 from longguikeji/feature-fix-extension-profile
Browse files Browse the repository at this point in the history
fix: 🐛 extension profile
  • Loading branch information
luolu-lg authored Jul 15, 2022
2 parents 8ed0245 + 59adf02 commit 7407983
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions api/v1/pages/platform_admin/extension_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
method=actions.FrontActionMethod.GET,
),
local_actions={
"markdown": actions.OpenAction(
name='文档',
page=arkstore_markdown_page
),
"install": actions.DirectAction(
name='安装',
path='/api/v1/tenant/{tenant_id}/arkstore/install/{uuid}/',
Expand Down
2 changes: 1 addition & 1 deletion api/v1/views/arkstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class PriceSchema(Schema):
type: str = Field(title=_('Payment Type', '付费方式'))
days: int = Field(title=_('Days', '天数'))
users: int = Field(title=_('Users', '人数'))
standard_price: str =Field(title=_('Standard Price', '市场指导价'))
standard_price: str =Field(underline=True, title=_('Standard Price', '市场指导价'))
sale_price: str =Field(title=_('Agent Sale Price', '代理价格'))


Expand Down
7 changes: 5 additions & 2 deletions api/v1/views/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@ def load_extension(request, extension_id: str):
id=(UUID,Field(hidden=True)),
)

@api.get("/extensions/{id}/profile/", response=ExtensionProfileGetSchemaOut, tags=['平台插件'])
class ExtensionProfileGetSchemaResponse(ResponseSchema):
data: ExtensionProfileGetSchemaOut

@api.get("/extensions/{id}/profile/", response=ExtensionProfileGetSchemaResponse, tags=['平台插件'])
@operation(roles=[PLATFORM_ADMIN])
def get_extension_profile(request, id: str):
"""获取插件启动配置
"""
extension = ExtensionModel.objects.filter(id=id).first()
return extension
return {"data": extension}

@api.post("/extensions/{id}/profile/", tags=['平台插件'])
@operation(roles=[PLATFORM_ADMIN])
Expand Down

0 comments on commit 7407983

Please sign in to comment.