Skip to content

Commit 0dde60c

Browse files
authored
feat: add POST/DELETE endpoints for incremental plugin member management (#2938)
1 parent e4ec768 commit 0dde60c

5 files changed

Lines changed: 188 additions & 67 deletions

File tree

apiserver/paasng/locale/en/LC_MESSAGES/django.po

Lines changed: 84 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2026-06-15 14:25+0800\n"
10+
"POT-Creation-Date: 2026-07-08 17:26+0800\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,23 +17,23 @@ msgstr ""
1717
"Content-Transfer-Encoding: 8bit\n"
1818
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1919

20-
#: paas_wl/bk_app/cnative/specs/constants.py:87
20+
#: paas_wl/bk_app/cnative/specs/constants.py:97
2121
msgid "待实施"
2222
msgstr "Pending"
2323

24-
#: paas_wl/bk_app/cnative/specs/constants.py:88
24+
#: paas_wl/bk_app/cnative/specs/constants.py:98
2525
msgid "进行中"
2626
msgstr "Ongoing"
2727

28-
#: paas_wl/bk_app/cnative/specs/constants.py:89
28+
#: paas_wl/bk_app/cnative/specs/constants.py:99
2929
msgid "已就绪"
3030
msgstr "Ready"
3131

32-
#: paas_wl/bk_app/cnative/specs/constants.py:90
32+
#: paas_wl/bk_app/cnative/specs/constants.py:100
3333
msgid "错误"
3434
msgstr "Error"
3535

36-
#: paas_wl/bk_app/cnative/specs/constants.py:91
36+
#: paas_wl/bk_app/cnative/specs/constants.py:101
3737
msgid "未知"
3838
msgstr "Unknown"
3939

@@ -247,8 +247,8 @@ msgstr ""
247247
#: paas_wl/bk_app/cnative/specs/views.py:136
248248
msgid "镜像仓库凭证错误, 请检查镜像凭证配置是否正确"
249249
msgstr ""
250-
"Image repository credential verification failed, please check the credentials "
251-
"are correct."
250+
"Image repository credential verification failed, please check the "
251+
"credentials are correct."
252252

253253
#: paas_wl/bk_app/cnative/specs/views.py:138
254254
msgid "镜像仓库请求超时, 请检查网络连接"
@@ -342,64 +342,68 @@ msgstr "Virtual cluster"
342342
msgid "AI Agent 沙箱"
343343
msgstr "AI Agent sandbox"
344344

345-
#: paas_wl/infras/cluster/constants.py:47
345+
#: paas_wl/infras/cluster/constants.py:38
346+
msgid "AI Agent 应用"
347+
msgstr "AI Agent App"
348+
349+
#: paas_wl/infras/cluster/constants.py:48
346350
msgid "允许挂载日志到主机"
347351
msgstr "Allows mounting logs to host"
348352

349-
#: paas_wl/infras/cluster/constants.py:53
353+
#: paas_wl/infras/cluster/constants.py:54
350354
msgid "Ingress 路径是否使用正则表达式"
351355
msgstr "Ingress path uses regex"
352356

353-
#: paas_wl/infras/cluster/constants.py:55
357+
#: paas_wl/infras/cluster/constants.py:56
354358
msgid "从蓝鲸监控查询资源使用率"
355359
msgstr "Retrieve resource metrics from BK Monitor"
356360

357-
#: paas_wl/infras/cluster/constants.py:60
361+
#: paas_wl/infras/cluster/constants.py:61
358362
#: paasng/platform/applications/constants.py:104
359363
msgid "使用蓝鲸日志平台方案采集日志"
360364
msgstr "Uses BlueKing log platform for log collection"
361365

362-
#: paas_wl/infras/cluster/constants.py:64
366+
#: paas_wl/infras/cluster/constants.py:65
363367
msgid "支持自动扩容"
364368
msgstr "Supports auto-scaling"
365369

366-
#: paas_wl/infras/cluster/constants.py:66
370+
#: paas_wl/infras/cluster/constants.py:67
367371
msgid "支持 BCS Egress"
368372
msgstr "Supports BCS Egress"
369373

370-
#: paas_wl/infras/cluster/constants.py:68
374+
#: paas_wl/infras/cluster/constants.py:69
371375
msgid "支持 gRPC Ingress"
372376
msgstr "Supports gRPC Ingress"
373377

374-
#: paas_wl/infras/cluster/constants.py:74
378+
#: paas_wl/infras/cluster/constants.py:75
375379
msgid "BCS 项目 ID"
376380
msgstr "BCS Project ID"
377381

378-
#: paas_wl/infras/cluster/constants.py:75
382+
#: paas_wl/infras/cluster/constants.py:76
379383
msgid "BCS 集群 ID"
380384
msgstr "BCS Cluster ID"
381385

382-
#: paas_wl/infras/cluster/constants.py:76
386+
#: paas_wl/infras/cluster/constants.py:77
383387
msgid "蓝鲸业务 ID"
384388
msgstr "Blueking Business ID"
385389

386-
#: paas_wl/infras/cluster/constants.py:78
390+
#: paas_wl/infras/cluster/constants.py:79
387391
msgid "跳过内置镜像凭证注入"
388392
msgstr "Skip inject builtin image credentials"
389393

390-
#: paas_wl/infras/cluster/constants.py:81
394+
#: paas_wl/infras/cluster/constants.py:82
391395
msgid "Ingress 类名"
392396
msgstr "Ingress Class Name"
393397

394-
#: paas_wl/infras/cluster/constants.py:84
398+
#: paas_wl/infras/cluster/constants.py:85
395399
msgid "Slugbuilder 资源配额"
396400
msgstr "Slugbuilder resource quota"
397401

398-
#: paas_wl/infras/cluster/constants.py:90
402+
#: paas_wl/infras/cluster/constants.py:91
399403
msgid "统一分配"
400404
msgstr "Uniform allocation"
401405

402-
#: paas_wl/infras/cluster/constants.py:91
406+
#: paas_wl/infras/cluster/constants.py:92
403407
msgid "按规则分配"
404408
msgstr "Allocate according to rules"
405409

@@ -973,7 +977,9 @@ msgstr "Try FAQ query"
973977

974978
#: paasng/accessories/smart_advisor/utils.py:60
975979
msgid "暂时无法找到解决方案,请前往“标准输出日志”检查是否有异常"
976-
msgstr "Temporarily unable to find a solution, please check the standard output log for exceptions"
980+
msgstr ""
981+
"Temporarily unable to find a solution, please check the standard output log "
982+
"for exceptions"
977983

978984
#: paasng/accessories/smart_advisor/utils.py:81
979985
msgid "已找到解决方案"
@@ -988,6 +994,12 @@ msgstr "The name of the API gateway to which the plugin is bound"
988994
msgid "部署请求异常,请稍候再试"
989995
msgstr "Deployment request exception, please try again later"
990996

997+
#: paasng/bk_plugins/bk_plugins/pluginscenter_views.py:410
998+
#: paasng/bk_plugins/bk_plugins/pluginscenter_views.py:429
999+
#, python-brace-format
1000+
msgid "无效的角色参数: {role}"
1001+
msgstr ""
1002+
9911003
#: paasng/bk_plugins/bk_plugins/tasks.py:51
9921004
#: paasng/platform/engine/views/misc.py:100
9931005
msgid "存在正在进行的下架任务,请勿重复操作"
@@ -2844,52 +2856,56 @@ msgstr "OAuth display information does not support the field {}"
28442856

28452857
#: paasng/plat_mgt/sourcectl/serializers.py:187
28462858
#: paasng/plat_mgt/sourcectl/serializers.py:200
2847-
#: paasng/plat_mgt/templates/serializers.py:181
2848-
#: paasng/plat_mgt/templates/serializers.py:196
2859+
#: paasng/plat_mgt/templates/serializers.py:188
2860+
#: paasng/plat_mgt/templates/serializers.py:203
28492861
msgid "名称已存在,请使用其他名称"
28502862
msgstr "name already exists, please use another name"
28512863

2852-
#: paasng/plat_mgt/templates/serializers.py:114
2864+
#: paasng/plat_mgt/templates/serializers.py:116
28532865
msgid "不支持的代码仓库类型"
28542866
msgstr "Unsupported Code Repository type"
28552867

2856-
#: paasng/plat_mgt/templates/serializers.py:119
2868+
#: paasng/plat_mgt/templates/serializers.py:121
2869+
msgid "支持的运行时类型必须为 List[str] 格式"
2870+
msgstr "Supported runtime type must be in List[str] format"
2871+
2872+
#: paasng/plat_mgt/templates/serializers.py:126
28572873
msgid "预设增强服务配置必须为 Dict 格式"
28582874
msgstr "Preset enhanced service configuration must be in Dict format"
28592875

2860-
#: paasng/plat_mgt/templates/serializers.py:125
2876+
#: paasng/plat_mgt/templates/serializers.py:132
28612877
msgid "构建工具配置必须为 List[str] 格式"
28622878
msgstr "Build tool configuration must be in List[str] format"
28632879

2864-
#: paasng/plat_mgt/templates/serializers.py:128
2880+
#: paasng/plat_mgt/templates/serializers.py:135
28652881
msgid "针对不同镜像配置 required_buildpacks 时必须配置默认值 __default__"
28662882
msgstr ""
28672883
"When configuring required_buildpacks for different images, the default value "
28682884
"__default__ must be set"
28692885

2870-
#: paasng/plat_mgt/templates/serializers.py:131
2886+
#: paasng/plat_mgt/templates/serializers.py:138
28712887
msgid "构建工具配置必须为 Dict[str, List[str]] 格式"
28722888
msgstr "Build tool configuration must be in Dict[str, List[str]] format"
28732889

2874-
#: paasng/plat_mgt/templates/serializers.py:133
2890+
#: paasng/plat_mgt/templates/serializers.py:140
28752891
msgid "构建工具必须为 List[str] 或 Dict[str, List[str]] 格式"
28762892
msgstr "Build tools must be in List[str] or Dict[str, List[str]] format"
28772893

2878-
#: paasng/plat_mgt/templates/serializers.py:138
2894+
#: paasng/plat_mgt/templates/serializers.py:145
28792895
msgid "进程配置必须为 Dict 格式"
28802896
msgstr "Process configuration must be in Dict format"
28812897

2882-
#: paasng/plat_mgt/templates/serializers.py:158
2898+
#: paasng/plat_mgt/templates/serializers.py:165
28832899
msgid "二进制包存储配置必须为有效的地址字符串"
28842900
msgstr ""
28852901
"The value of the binary package storage configuration must be a valid "
28862902
"address string"
28872903

2888-
#: paasng/plat_mgt/templates/serializers.py:164
2904+
#: paasng/plat_mgt/templates/serializers.py:171
28892905
msgid "插件模板必须配置代码仓库地址"
28902906
msgstr "Plugin template must config Code Repository Address (repo_url)"
28912907

2892-
#: paasng/plat_mgt/templates/serializers.py:166
2908+
#: paasng/plat_mgt/templates/serializers.py:173
28932909
msgid "插件模板必须配置代码所在目录"
28942910
msgstr "Plugin template must config Template code directory (source_dir)"
28952911

@@ -3469,11 +3485,11 @@ msgstr ""
34693485
msgid "发布时自动构建"
34703486
msgstr "Automatically build when deploying"
34713487

3472-
#: paasng/platform/engine/deploy/interruptions.py:47
3488+
#: paasng/platform/engine/deploy/interruptions.py:50
34733489
msgid "无法中断由他人发起的部署"
34743490
msgstr "Cannot interrupt deployment initiated by others"
34753491

3476-
#: paasng/platform/engine/deploy/interruptions.py:49
3492+
#: paasng/platform/engine/deploy/interruptions.py:52
34773493
msgid "无法中断,部署已处于结束状态"
34783494
msgstr "cannot be interrupted, deployment has ended"
34793495

@@ -3666,14 +3682,13 @@ msgstr ""
36663682
"contact the APP administrator"
36673683

36683684
#: paasng/platform/engine/workflow/srv_version.py:69
3669-
#, python-brace-format
36703685
msgid ""
36713686
"平台未正常部署,无法进行操作,请联系管理员。组件版本不一致:apiserver:'{}', "
36723687
"operator:'{}'"
36733688
msgstr ""
36743689
"The platform is not properly deployed and cannot perform this operation. "
3675-
"Please contact the administrator. Component version mismatch: apiserver:'{}', "
3676-
"operator:'{}'"
3690+
"Please contact the administrator. Component version mismatch: "
3691+
"apiserver:'{}', operator:'{}'"
36773692

36783693
#: paasng/platform/evaluation/constants.py:25
36793694
msgid "运行中"
@@ -3878,71 +3893,71 @@ msgstr "No known reason, please contact the administrator"
38783893
msgid "已确认后的应用无法回滚"
38793894
msgstr "APP that have been confirmed cannot be rolled back"
38803895

3881-
#: paasng/platform/modules/manager.py:386
3896+
#: paasng/platform/modules/manager.py:389
38823897
msgid "平台代码仓库组配置缺失"
38833898
msgstr "Platform code repository group configuration is missing"
38843899

3885-
#: paasng/platform/modules/manager.py:389
3886-
#: paasng/platform/modules/manager.py:428
3900+
#: paasng/platform/modules/manager.py:392
3901+
#: paasng/platform/modules/manager.py:431
38873902
msgid "当前代码源不支持新建仓库"
38883903
msgstr "The current code source does not support creating a new repository"
38893904

3890-
#: paasng/platform/modules/manager.py:403
3891-
#: paasng/platform/modules/manager.py:466
3905+
#: paasng/platform/modules/manager.py:406
3906+
#: paasng/platform/modules/manager.py:469
38923907
msgid "仓库名称已存在"
38933908
msgstr "The repository name already exists"
38943909

3895-
#: paasng/platform/modules/manager.py:406
3896-
#: paasng/platform/modules/manager.py:469
3910+
#: paasng/platform/modules/manager.py:409
3911+
#: paasng/platform/modules/manager.py:472
38973912
msgid "创建代码仓库失败"
38983913
msgstr "Failed to create code repository"
38993914

3900-
#: paasng/platform/modules/manager.py:439
3915+
#: paasng/platform/modules/manager.py:442
39013916
msgid "您没有权限操作该代码仓库,请确认您的授权信息"
39023917
msgstr ""
39033918
"You do not have permission to operate this code repository. Please confirm "
39043919
"your authorization information."
39053920

3906-
#: paasng/platform/modules/manager.py:447
3921+
#: paasng/platform/modules/manager.py:450
39073922
msgid "必须使用“当前账号”授权才能在用户命名空间下创建仓库"
39083923
msgstr ""
39093924
"You must use 'Current Account' authorization to create a repository in the "
39103925
"user namespace"
39113926

3912-
#: paasng/platform/modules/manager.py:464
3927+
#: paasng/platform/modules/manager.py:467
39133928
msgid "创建代码仓库失败,请确认您的授权信息"
39143929
msgstr ""
39153930
"Failed to create the code repository, please confirm your auth information"
39163931

3917-
#: paasng/platform/modules/manager.py:481
3932+
#: paasng/platform/modules/manager.py:484
39183933
msgid "当前代码源不支持删除仓库"
39193934
msgstr "The current code source does not support deleting the repository"
39203935

3921-
#: paasng/platform/modules/manager.py:525
3922-
#: paasng/platform/modules/manager.py:565
3936+
#: paasng/platform/modules/manager.py:528
3937+
#: paasng/platform/modules/manager.py:568
39233938
msgid "服务暂时不可用,请稍候再试"
39243939
msgstr "Service is temporarily unavailable, please try again later"
39253940

3926-
#: paasng/platform/modules/manager.py:528
3927-
#: paasng/platform/modules/manager.py:605
3941+
#: paasng/platform/modules/manager.py:531
3942+
#: paasng/platform/modules/manager.py:608
39283943
msgid "绑定初始增强服务失败,请稍候再试"
39293944
msgstr "Failed to bind the initial Add-ons, please try again later"
39303945

3931-
#: paasng/platform/modules/manager.py:533
3932-
#: paasng/platform/modules/manager.py:595
3933-
#: paasng/platform/modules/manager.py:599
3946+
#: paasng/platform/modules/manager.py:536
3947+
#: paasng/platform/modules/manager.py:598
3948+
#: paasng/platform/modules/manager.py:602
39343949
msgid "绑定初始运行环境失败,请稍候再试"
39353950
msgstr "Failed to bind the initial runtime environment, please try again later"
39363951

3937-
#: paasng/platform/modules/manager.py:571
3952+
#: paasng/platform/modules/manager.py:574
39383953
msgid "代码初始化过程失败,请稍候再试"
39393954
msgstr "Code initialization process failed, please wait and try again"
39403955

3941-
#: paasng/platform/modules/manager.py:602
3956+
#: paasng/platform/modules/manager.py:605
39423957
msgid "配置镜像 Registry 失败,请稍候再试"
39433958
msgstr "Failed to configure mirror Registry, please try again later"
39443959

3945-
#: paasng/platform/modules/manager.py:609
3960+
#: paasng/platform/modules/manager.py:612
39463961
msgid "初始化应用模型失败, 请稍候再试"
39473962
msgstr "Failed to initialize the application model. Please try again later."
39483963

@@ -4396,15 +4411,19 @@ msgstr "Template code directory"
43964411
msgid "模板渲染方式"
43974412
msgstr "Template rendering method"
43984413

4399-
#: paasng/platform/templates/models.py:60
4414+
#: paasng/platform/templates/models.py:65
44004415
msgid "运行时类型"
44014416
msgstr "Runtime Type"
44024417

4403-
#: paasng/platform/templates/models.py:62
4418+
#: paasng/platform/templates/models.py:66
4419+
msgid "支持的运行时类型"
4420+
msgstr "Supported runtime types"
4421+
4422+
#: paasng/platform/templates/models.py:68
44044423
msgid "是否隐藏"
44054424
msgstr "Is Hidden"
44064425

4407-
#: paasng/platform/templates/models.py:62
4426+
#: paasng/platform/templates/models.py:68
44084427
msgid "被隐藏的模板不会出现在创建应用时的列表中"
44094428
msgstr ""
44104429
"hidden templates will not appear in the list when creating new applications"

apiserver/paasng/paasng/bk_plugins/bk_plugins/api_serializers.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,18 @@ class Meta:
163163
ref_name = "PluginMemberSLZ__bk_plugins"
164164

165165

166+
class PluginRoleMembersSLZ(serializers.Serializer):
167+
usernames = serializers.ListField(
168+
child=serializers.CharField(help_text="用户名"),
169+
allow_empty=False,
170+
help_text="需要操作的用户名列表",
171+
)
172+
173+
class Meta:
174+
# Set a ref_name to avoid conflicts for drf-yasg
175+
ref_name = "PluginRoleMembersSLZ__bk_plugins"
176+
177+
166178
class PluginConfigSLZ(serializers.Serializer):
167179
"""插件配置-环境变量的结构"""
168180

0 commit comments

Comments
 (0)