diff --git a/apps/acls/serializers/rules/rules.py b/apps/acls/serializers/rules/rules.py index 4c88d0ac7..956111648 100644 --- a/apps/acls/serializers/rules/rules.py +++ b/apps/acls/serializers/rules/rules.py @@ -1,5 +1,7 @@ # coding: utf-8 # +from urllib.parse import urlparse + from django.utils.translation import gettext_lazy as _ from rest_framework import serializers @@ -8,7 +10,7 @@ from common.utils.ip import is_ip_address, is_ip_network, is_ip_segment logger = get_logger(__file__) -__all__ = ['RuleSerializer', 'ip_group_child_validator', 'ip_group_help_text'] +__all__ = ['RuleSerializer', 'ip_group_child_validator', 'ip_group_help_text', 'address_validator'] def ip_group_child_validator(ip_group_child): @@ -21,6 +23,19 @@ def ip_group_child_validator(ip_group_child): raise serializers.ValidationError(error) +def address_validator(value): + parsed = urlparse(value) + is_basic_url = parsed.scheme in ('http', 'https') and parsed.netloc + is_valid = value == '*' \ + or is_ip_address(value) \ + or is_ip_network(value) \ + or is_ip_segment(value) \ + or is_basic_url + if not is_valid: + error = _('address invalid: `{}`').format(value) + raise serializers.ValidationError(error) + + ip_group_help_text = _( 'With * indicating a match all. ' 'Such as: ' diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 543627ae5..5c33a5f43 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: JumpServer 0.3.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-22 17:33+0800\n" +"POT-Creation-Date: 2025-08-25 11:01+0800\n" "PO-Revision-Date: 2021-05-20 10:54+0800\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -21,7 +21,7 @@ msgstr "" msgid "The parameter 'action' must be [{}]" msgstr "参数 'action' 必须是 [{}]" -#: accounts/automations/change_secret/manager.py:225 +#: accounts/automations/change_secret/manager.py:226 #, python-format msgid "Success: %s, Failed: %s, Total: %s" msgstr "成功: %s, 失败: %s, 总数: %s" @@ -39,6 +39,8 @@ msgstr "成功: %s, 失败: %s, 总数: %s" #: users/templates/users/_msg_user_created.html:13 #: users/templates/users/user_password_verify.html:18 #: xpack/plugins/cloud/serializers/account_attrs.py:28 +#: xpack/plugins/cloud/serializers/account_attrs.py:90 +#: xpack/plugins/cloud/serializers/account_attrs.py:97 msgid "Password" msgstr "密码" @@ -83,7 +85,7 @@ msgstr "匿名账号" msgid "Specified account" msgstr "指定账号" -#: accounts/const/account.py:26 users/models/user.py:753 +#: accounts/const/account.py:26 users/models/user.py:769 msgid "Local" msgstr "数据库" @@ -210,7 +212,7 @@ msgstr "仅创建" #: authentication/serializers/password_mfa.py:24 #: notifications/backends/__init__.py:10 settings/serializers/msg.py:22 #: settings/serializers/msg.py:64 users/forms/profile.py:100 -#: users/forms/profile.py:108 users/models/user.py:817 +#: users/forms/profile.py:108 users/models/user.py:833 #: users/templates/users/forgot_password.html:162 #: users/views/profile/reset.py:94 msgid "Email" @@ -274,7 +276,7 @@ msgstr "用户 %s 查看/导出 了密码" #: assets/models/asset/common.py:350 assets/models/cmd_filter.py:36 #: audits/models.py:58 authentication/models/connection_token.py:36 #: perms/models/asset_permission.py:69 perms/serializers/permission.py:35 -#: terminal/backends/command/models.py:17 terminal/models/session/session.py:32 +#: terminal/backends/command/models.py:17 terminal/models/session/session.py:33 #: terminal/notifications.py:155 terminal/serializers/command.py:17 #: terminal/serializers/session.py:28 #: terminal/templates/terminal/_msg_command_warning.html:4 @@ -302,7 +304,7 @@ msgid "historical Account" msgstr "账号历史" #: accounts/models/account.py:58 accounts/serializers/account/account.py:226 -#: users/models/user.py:860 +#: users/models/user.py:876 msgid "Source" msgstr "来源" @@ -319,7 +321,7 @@ msgstr "来源 ID" #: audits/models.py:59 authentication/api/connection_token.py:411 #: ops/models/base.py:18 perms/models/asset_permission.py:75 #: perms/serializers/permission.py:40 settings/serializers/msg.py:33 -#: terminal/backends/command/models.py:18 terminal/models/session/session.py:34 +#: terminal/backends/command/models.py:18 terminal/models/session/session.py:35 #: terminal/templates/terminal/_msg_command_warning.html:8 #: terminal/templates/terminal/_msg_session_sharing.html:8 #: tickets/models/ticket/command_confirm.py:13 xpack/plugins/cloud/models.py:86 @@ -391,7 +393,7 @@ msgstr "账号备份计划" #: ops/templates/ops/celery_task_log.html:75 #: perms/models/asset_permission.py:78 #: settings/templates/ldap/_msg_import_ldap_user.html:5 -#: terminal/models/applet/host.py:141 terminal/models/session/session.py:45 +#: terminal/models/applet/host.py:141 terminal/models/session/session.py:46 #: tickets/models/ticket/apply_application.py:30 #: tickets/models/ticket/apply_asset.py:19 msgid "Date start" @@ -506,7 +508,7 @@ msgstr "结束日期" #: accounts/models/automations/change_secret.py:44 #: assets/models/automations/base.py:113 audits/models.py:208 #: audits/serializers.py:54 ops/models/base.py:49 ops/models/job.py:234 -#: terminal/models/applet/applet.py:331 terminal/models/applet/host.py:140 +#: terminal/models/applet/applet.py:330 terminal/models/applet/host.py:140 #: terminal/models/component/status.py:30 #: terminal/models/virtualapp/virtualapp.py:99 #: terminal/serializers/applet.py:18 terminal/serializers/applet_host.py:136 @@ -549,9 +551,11 @@ msgstr "最后登录日期" #: authentication/templates/authentication/_msg_different_city.html:9 #: authentication/templates/authentication/_msg_oauth_bind.html:9 #: terminal/serializers/storage.py:136 users/forms/profile.py:31 -#: users/forms/profile.py:114 users/models/user.py:813 +#: users/forms/profile.py:114 users/models/user.py:829 #: users/templates/users/_msg_user_created.html:12 #: xpack/plugins/cloud/serializers/account_attrs.py:26 +#: xpack/plugins/cloud/serializers/account_attrs.py:88 +#: xpack/plugins/cloud/serializers/account_attrs.py:95 msgid "Username" msgstr "用户名" @@ -637,7 +641,7 @@ msgstr "密码规则" #: ops/models/celery.py:80 ops/models/job.py:142 ops/models/playbook.py:28 #: ops/serializers/job.py:18 orgs/models.py:82 #: perms/models/asset_permission.py:61 rbac/models/role.py:29 -#: settings/models.py:33 settings/models.py:181 settings/serializers/msg.py:89 +#: settings/models.py:34 settings/models.py:182 settings/serializers/msg.py:89 #: terminal/models/applet/applet.py:34 terminal/models/component/endpoint.py:12 #: terminal/models/component/endpoint.py:109 #: terminal/models/component/storage.py:26 terminal/models/component/task.py:13 @@ -645,7 +649,7 @@ msgstr "密码规则" #: terminal/models/virtualapp/provider.py:10 #: terminal/models/virtualapp/virtualapp.py:19 tickets/api/ticket.py:87 #: users/forms/profile.py:32 users/models/group.py:13 -#: users/models/preference.py:11 users/models/user.py:815 +#: users/models/preference.py:11 users/models/user.py:831 #: xpack/plugins/cloud/models.py:33 xpack/plugins/cloud/models.py:281 #: xpack/plugins/cloud/serializers/task.py:70 msgid "Name" @@ -779,7 +783,7 @@ msgstr "账号存在策略" #: assets/models/label.py:21 assets/models/platform.py:95 #: assets/serializers/asset/common.py:125 assets/serializers/cagegory.py:12 #: assets/serializers/platform.py:133 assets/serializers/platform.py:222 -#: perms/serializers/user_permission.py:26 settings/models.py:35 +#: perms/serializers/user_permission.py:26 settings/models.py:36 #: tickets/models/ticket/apply_application.py:13 users/models/preference.py:12 msgid "Category" msgstr "类别" @@ -867,16 +871,16 @@ msgstr "ID" #: audits/serializers.py:171 authentication/models/connection_token.py:32 #: authentication/models/sso_token.py:16 #: notifications/models/notification.py:12 -#: perms/api/user_permission/mixin.py:55 perms/models/asset_permission.py:63 +#: perms/api/user_permission/mixin.py:59 perms/models/asset_permission.py:63 #: perms/serializers/permission.py:31 rbac/builtin.py:124 #: rbac/models/rolebinding.py:49 rbac/serializers/rolebinding.py:17 -#: terminal/backends/command/models.py:16 terminal/models/session/session.py:30 +#: terminal/backends/command/models.py:16 terminal/models/session/session.py:31 #: terminal/models/session/sharing.py:34 terminal/notifications.py:156 #: terminal/notifications.py:205 terminal/serializers/command.py:16 #: terminal/templates/terminal/_msg_command_warning.html:6 #: terminal/templates/terminal/_msg_session_sharing.html:6 -#: tickets/models/comment.py:21 users/const.py:14 users/models/user.py:1020 -#: users/models/user.py:1058 users/serializers/group.py:21 +#: tickets/models/comment.py:21 users/const.py:14 users/models/user.py:1036 +#: users/models/user.py:1074 users/serializers/group.py:21 msgid "User" msgstr "用户" @@ -962,13 +966,13 @@ msgstr "关联平台,可配置推送参数,如果不关联,将使用默认 #: assets/models/cmd_filter.py:40 assets/models/cmd_filter.py:88 #: assets/models/group.py:20 common/db/models.py:36 ops/models/adhoc.py:26 #: ops/models/job.py:158 ops/models/playbook.py:31 rbac/models/role.py:37 -#: settings/models.py:38 terminal/models/applet/applet.py:46 -#: terminal/models/applet/applet.py:332 terminal/models/applet/host.py:143 +#: settings/models.py:39 terminal/models/applet/applet.py:46 +#: terminal/models/applet/applet.py:331 terminal/models/applet/host.py:143 #: terminal/models/component/endpoint.py:25 #: terminal/models/component/endpoint.py:119 -#: terminal/models/session/session.py:47 +#: terminal/models/session/session.py:48 #: terminal/models/virtualapp/virtualapp.py:28 tickets/models/comment.py:32 -#: tickets/models/ticket/general.py:298 users/models/user.py:851 +#: tickets/models/ticket/general.py:298 users/models/user.py:867 #: xpack/plugins/cloud/models.py:40 xpack/plugins/cloud/models.py:108 msgid "Comment" msgstr "备注" @@ -1175,7 +1179,7 @@ msgstr "账号管理" #: acls/models/command_acl.py:16 assets/models/cmd_filter.py:60 #: ops/serializers/job.py:70 terminal/const.py:86 -#: terminal/models/session/session.py:43 terminal/serializers/command.py:18 +#: terminal/models/session/session.py:44 terminal/serializers/command.py:18 #: terminal/templates/terminal/_msg_command_alert.html:12 #: terminal/templates/terminal/_msg_command_execute_alert.html:10 #: terminal/templates/terminal/_msg_command_warning.html:23 @@ -1188,7 +1192,7 @@ msgid "Regex" msgstr "正则表达式" #: acls/models/command_acl.py:26 assets/models/cmd_filter.py:79 -#: settings/models.py:182 settings/serializers/feature.py:19 +#: settings/models.py:183 settings/serializers/feature.py:19 #: xpack/plugins/license/models.py:30 msgid "Content" msgstr "内容" @@ -1268,8 +1272,8 @@ msgid "" "10.1.1.1-10.1.1.20, 2001:db8:2de::e13, 2001:db8:1a:1110::/64 (Domain name " "support)" msgstr "" -"* 表示匹配所有。例如: 192.168.10.1, 192.168.1.0/24, 10.1.1.1-10.1.1.20, 2001:" -"db8:2de::e13, 2001:db8:1a:1110::/64 (支持网域)" +"* 表示匹配所有。例如: 192.168.10.1, 192.168.1.0/24, 10.1.1.1-10.1.1.20, " +"2001:db8:2de::e13, 2001:db8:1a:1110::/64 (支持网域)" #: acls/serializers/base.py:41 assets/serializers/asset/host.py:19 msgid "IP/Host" @@ -1287,20 +1291,24 @@ msgstr "组织 `{}` 不存在" msgid "None of the reviewers belong to Organization `{}`" msgstr "所有复核人都不属于组织 `{}`" -#: acls/serializers/rules/rules.py:20 +#: acls/serializers/rules/rules.py:22 #: xpack/plugins/cloud/serializers/task.py:145 msgid "IP address invalid: `{}`" msgstr "IP 地址无效: `{}`" -#: acls/serializers/rules/rules.py:25 +#: acls/serializers/rules/rules.py:35 +msgid "address invalid: `{}`" +msgstr "IP 地址无效: `{}`" + +#: acls/serializers/rules/rules.py:40 msgid "" "With * indicating a match all. Such as: 192.168.10.1, 192.168.1.0/24, " "10.1.1.1-10.1.1.20, 2001:db8:2de::e13, 2001:db8:1a:1110::/64 " msgstr "" -"* 表示匹配所有。例如: 192.168.10.1, 192.168.1.0/24, 10.1.1.1-10.1.1.20, 2001:" -"db8:2de::e13, 2001:db8:1a:1110::/64" +"* 表示匹配所有。例如: 192.168.10.1, 192.168.1.0/24, 10.1.1.1-10.1.1.20, " +"2001:db8:2de::e13, 2001:db8:1a:1110::/64" -#: acls/serializers/rules/rules.py:33 +#: acls/serializers/rules/rules.py:48 #: authentication/templates/authentication/_msg_oauth_bind.html:12 #: authentication/templates/authentication/_msg_rest_password_success.html:8 #: authentication/templates/authentication/_msg_rest_public_key_success.html:8 @@ -1308,7 +1316,7 @@ msgstr "" msgid "IP" msgstr "IP" -#: acls/serializers/rules/rules.py:35 +#: acls/serializers/rules/rules.py:50 msgid "Time Period" msgstr "时段" @@ -1392,11 +1400,11 @@ msgstr "同级别节点名字不能重复" msgid "App assets" msgstr "资产管理" -#: assets/automations/base/manager.py:187 +#: assets/automations/base/manager.py:188 msgid "{} disabled" msgstr "{} 已禁用" -#: assets/automations/base/manager.py:250 +#: assets/automations/base/manager.py:252 msgid " - Platform {} ansible disabled" msgstr " - 平台 {} Ansible 已禁用, 无法执行任务" @@ -1410,12 +1418,11 @@ msgid "Asset, {}, using account {}" msgstr "资产, {}, 使用账号 {}" #: assets/automations/ping_gateway/manager.py:55 -#, python-brace-format msgid "Unable to connect to port {port} on {address}" msgstr "无法连接到 {port} 上的端口 {address}" #: assets/automations/ping_gateway/manager.py:58 -#: authentication/middleware.py:94 xpack/plugins/cloud/providers/fc.py:47 +#: authentication/middleware.py:95 xpack/plugins/cloud/providers/fc.py:47 msgid "Authentication failed" msgstr "认证失败" @@ -1486,7 +1493,8 @@ msgstr "云服务" msgid "Web" msgstr "Web" -#: assets/const/category.py:16 common/sdk/sms/endpoint.py:20 +#: assets/const/category.py:16 common/sdk/sms/custom_file.py:47 +#: common/sdk/sms/endpoint.py:20 msgid "Custom type" msgstr "自定义" @@ -1540,7 +1548,6 @@ msgid "SFTP root" msgstr "SFTP 根路径" #: assets/const/protocol.py:60 -#, python-brace-format msgid "" "SFTP root directory, Support variable:
- ${ACCOUNT} The connected " "account username
- ${HOME} The home directory of the connected account " @@ -1692,18 +1699,18 @@ msgstr "SSH公钥" #: assets/models/_user.py:28 assets/models/automations/base.py:114 #: assets/models/cmd_filter.py:41 assets/models/group.py:19 #: audits/models.py:269 common/db/models.py:34 ops/models/base.py:54 -#: ops/models/job.py:241 users/models/user.py:1059 +#: ops/models/job.py:241 users/models/user.py:1075 msgid "Date created" msgstr "创建日期" #: assets/models/_user.py:29 assets/models/cmd_filter.py:42 -#: common/db/models.py:35 users/models/user.py:869 +#: common/db/models.py:35 users/models/user.py:885 msgid "Date updated" msgstr "更新日期" #: assets/models/_user.py:30 assets/models/cmd_filter.py:44 #: assets/models/cmd_filter.py:91 assets/models/group.py:18 -#: common/db/models.py:32 users/models/user.py:858 +#: common/db/models.py:32 users/models/user.py:874 #: users/serializers/group.py:32 msgid "Created by" msgstr "创建者" @@ -1789,6 +1796,7 @@ msgid "Port" msgstr "端口" #: assets/models/asset/common.py:160 assets/serializers/asset/common.py:150 +#: terminal/serializers/endpoint.py:69 msgid "Address" msgstr "地址" @@ -1892,7 +1900,7 @@ msgstr "校验日期" #: assets/models/cmd_filter.py:28 perms/models/asset_permission.py:66 #: perms/serializers/permission.py:33 users/models/group.py:25 -#: users/models/user.py:821 +#: users/models/user.py:837 msgid "User group" msgstr "用户组" @@ -1942,7 +1950,7 @@ msgstr "默认" msgid "Default asset group" msgstr "默认资产组" -#: assets/models/label.py:15 rbac/const.py:6 users/models/user.py:1044 +#: assets/models/label.py:15 rbac/const.py:6 users/models/user.py:1060 msgid "System" msgstr "系统" @@ -1951,7 +1959,7 @@ msgstr "系统" #: assets/serializers/cagegory.py:24 #: authentication/models/connection_token.py:29 #: authentication/serializers/connect_token_secret.py:125 -#: common/serializers/common.py:86 labels/models.py:12 settings/models.py:34 +#: common/serializers/common.py:86 labels/models.py:12 settings/models.py:35 #: users/models/preference.py:13 msgid "Value" msgstr "值" @@ -2009,7 +2017,7 @@ msgid "Setting" msgstr "设置" #: assets/models/platform.py:38 audits/const.py:59 -#: authentication/backends/passkey/models.py:11 settings/models.py:37 +#: authentication/backends/passkey/models.py:11 settings/models.py:38 #: terminal/serializers/applet_host.py:33 msgid "Enabled" msgstr "启用" @@ -2162,7 +2170,7 @@ msgstr "端口超出范围 (0-65535)" msgid "Protocol is required: {}" msgstr "协议是必填的: {}" -#: assets/serializers/asset/common.py:316 +#: assets/serializers/asset/common.py:316 labels/api.py:107 msgid "Invalid data" msgstr "无效的数据" @@ -2244,7 +2252,7 @@ msgstr "约束" msgid "Types" msgstr "类型" -#: assets/serializers/domain.py:62 perms/serializers/permission.py:178 +#: assets/serializers/domain.py:62 perms/serializers/permission.py:181 msgid "Assets amount" msgstr "资产数量" @@ -2386,6 +2394,10 @@ msgstr "没有匹配到资产,结束任务" msgid "Audits" msgstr "日志审计" +#: audits/backends/__init__.py:29 audits/const.py:51 audits/models.py:132 +msgid "Operate log" +msgstr "操作日志" + #: audits/backends/db.py:16 msgid "The text content is too long. Use Elasticsearch to store operation logs" msgstr "文字内容太长。请使用 Elasticsearch 存储操作日志" @@ -2428,7 +2440,7 @@ msgstr "重命名" msgid "Symlink" msgstr "建立软链接" -#: audits/const.py:18 audits/const.py:28 terminal/api/session/session.py:149 +#: audits/const.py:18 audits/const.py:28 terminal/api/session/session.py:150 msgid "Download" msgstr "下载" @@ -2436,7 +2448,7 @@ msgstr "下载" msgid "Rename dir" msgstr "映射目录" -#: audits/const.py:23 rbac/tree.py:238 terminal/api/session/session.py:277 +#: audits/const.py:23 rbac/tree.py:238 terminal/api/session/session.py:281 #: terminal/templates/terminal/_msg_command_warning.html:18 #: terminal/templates/terminal/_msg_session_sharing.html:10 msgid "View" @@ -2485,10 +2497,6 @@ msgstr "结束" msgid "Terminal" msgstr "终端" -#: audits/const.py:51 audits/models.py:132 -msgid "Operate log" -msgstr "操作日志" - #: audits/const.py:52 msgid "Session log" msgstr "会话日志" @@ -2519,7 +2527,7 @@ msgid "Job audit log" msgstr "作业审计日志" #: audits/models.py:56 audits/models.py:100 audits/models.py:175 -#: terminal/models/session/session.py:39 terminal/models/session/sharing.py:113 +#: terminal/models/session/session.py:40 terminal/models/session/sharing.py:113 msgid "Remote addr" msgstr "远端地址" @@ -2531,7 +2539,8 @@ msgstr "操作" msgid "Filename" msgstr "文件名" -#: audits/models.py:66 common/serializers/common.py:98 +#: audits/models.py:66 common/sdk/sms/custom_file.py:47 +#: common/serializers/common.py:98 msgid "File" msgstr "文件" @@ -2597,8 +2606,8 @@ msgstr "登录 IP" #: audits/models.py:200 audits/serializers.py:52 #: authentication/templates/authentication/_mfa_confirm_modal.html:14 -#: users/forms/profile.py:63 users/models/user.py:838 -#: users/serializers/profile.py:102 +#: users/forms/profile.py:63 users/models/user.py:854 +#: users/serializers/profile.py:103 msgid "MFA" msgstr "MFA" @@ -2646,7 +2655,7 @@ msgstr "用户 %s %s 了当前资源" #: audits/serializers.py:172 authentication/models/connection_token.py:47 #: authentication/models/temp_token.py:13 perms/models/asset_permission.py:80 #: tickets/models/ticket/apply_application.py:31 -#: tickets/models/ticket/apply_asset.py:20 users/models/user.py:856 +#: tickets/models/ticket/apply_asset.py:20 users/models/user.py:872 msgid "Date expired" msgstr "失效日期" @@ -2679,29 +2688,29 @@ msgstr "认证令牌" #: audits/signal_handlers/login_log.py:37 authentication/notifications.py:73 #: authentication/views/login.py:77 notifications/backends/__init__.py:11 -#: settings/serializers/auth/wecom.py:10 users/models/user.py:760 -#: users/models/user.py:870 +#: settings/serializers/auth/wecom.py:10 users/models/user.py:776 +#: users/models/user.py:886 msgid "WeCom" msgstr "企业微信" #: audits/signal_handlers/login_log.py:38 authentication/views/feishu.py:97 #: authentication/views/login.py:89 notifications/backends/__init__.py:14 -#: settings/serializers/auth/feishu.py:10 users/models/user.py:762 -#: users/models/user.py:872 +#: settings/serializers/auth/feishu.py:10 users/models/user.py:778 +#: users/models/user.py:888 msgid "FeiShu" msgstr "飞书" #: audits/signal_handlers/login_log.py:40 authentication/views/login.py:101 #: authentication/views/slack.py:79 notifications/backends/__init__.py:16 -#: settings/serializers/auth/slack.py:10 users/models/user.py:764 -#: users/models/user.py:874 +#: settings/serializers/auth/slack.py:10 users/models/user.py:780 +#: users/models/user.py:890 msgid "Slack" msgstr "" #: audits/signal_handlers/login_log.py:41 authentication/views/dingtalk.py:153 #: authentication/views/login.py:83 notifications/backends/__init__.py:12 -#: settings/serializers/auth/dingtalk.py:10 users/models/user.py:761 -#: users/models/user.py:871 +#: settings/serializers/auth/dingtalk.py:10 users/models/user.py:777 +#: users/models/user.py:887 msgid "DingTalk" msgstr "钉钉" @@ -2764,7 +2773,7 @@ msgstr "ACL 动作是复核" msgid "Current user not support mfa type: {}" msgstr "当前用户不支持 MFA 类型: {}" -#: authentication/api/password.py:33 terminal/api/session/session.py:325 +#: authentication/api/password.py:33 terminal/api/session/session.py:329 #: users/views/profile/reset.py:63 msgid "User does not exist: {}" msgstr "用户不存在: {}" @@ -2793,7 +2802,7 @@ msgid "Authentication" msgstr "认证" #: authentication/backends/custom.py:59 -#: authentication/backends/oauth2/backends.py:173 +#: authentication/backends/oauth2/backends.py:158 msgid "User invalid, disabled or expired" msgstr "用户无效,已禁用或已过期" @@ -2901,7 +2910,6 @@ msgid "No session found, check your cookie" msgstr "会话已变更,刷新页面" #: authentication/errors/const.py:41 -#, python-brace-format msgid "" "The username or password you entered is incorrect, please enter it again. " "You can also try {times_try} times (The account will be temporarily locked " @@ -2923,7 +2931,6 @@ msgid "" msgstr "IP 已被锁定 (请联系管理员解锁或 {} 分钟后重试)" #: authentication/errors/const.py:59 -#, python-brace-format msgid "" "{error}, You can also try {times_try} times (The account will be temporarily " "locked for {block_time} minutes)" @@ -3005,15 +3012,15 @@ msgstr "您的密码无效" msgid "Please wait for %s seconds before retry" msgstr "请在 %s 秒后重试" -#: authentication/errors/redirect.py:85 authentication/mixins.py:323 +#: authentication/errors/redirect.py:85 authentication/mixins.py:325 msgid "Your password is too simple, please change it for security" msgstr "你的密码过于简单,为了安全,请修改" -#: authentication/errors/redirect.py:93 authentication/mixins.py:330 +#: authentication/errors/redirect.py:93 authentication/mixins.py:334 msgid "You should to change your password before login" msgstr "登录完成前,请先修改密码" -#: authentication/errors/redirect.py:101 authentication/mixins.py:337 +#: authentication/errors/redirect.py:101 authentication/mixins.py:343 msgid "Your password has expired, please reset before logging in" msgstr "您的密码已过期,先修改再登录" @@ -3110,7 +3117,7 @@ msgstr "设置手机号码启用" msgid "Clear phone number to disable" msgstr "清空手机号码禁用" -#: authentication/middleware.py:95 settings/utils/ldap.py:679 +#: authentication/middleware.py:96 settings/utils/ldap.py:679 msgid "Authentication failed (before login check failed): {}" msgstr "认证失败 (登录前检查失败): {}" @@ -3325,13 +3332,13 @@ msgid "Show" msgstr "显示" #: authentication/templates/authentication/_access_key_modal.html:66 -#: users/const.py:42 users/models/user.py:655 users/serializers/profile.py:92 +#: users/const.py:42 users/models/user.py:671 users/serializers/profile.py:93 #: users/templates/users/user_verify_mfa.html:36 msgid "Disable" msgstr "禁用" #: authentication/templates/authentication/_access_key_modal.html:67 -#: users/const.py:43 users/models/user.py:656 users/serializers/profile.py:93 +#: users/const.py:43 users/models/user.py:672 users/serializers/profile.py:94 #: users/templates/users/mfa_setting.html:26 #: users/templates/users/mfa_setting.html:68 msgid "Enable" @@ -3370,7 +3377,7 @@ msgstr "代码错误" #: authentication/templates/authentication/_msg_reset_password_code.html:9 #: authentication/templates/authentication/_msg_rest_password_success.html:2 #: authentication/templates/authentication/_msg_rest_public_key_success.html:2 -#: jumpserver/conf.py:465 +#: jumpserver/conf.py:468 #: perms/templates/perms/_msg_item_permissions_expire.html:3 #: perms/templates/perms/_msg_permed_items_expire.html:3 #: tickets/templates/tickets/approve_check_password.html:32 @@ -3690,7 +3697,7 @@ msgstr "从企业微信获取用户失败" msgid "Please login with a password and then bind the WeCom" msgstr "请使用密码登录,然后绑定企业微信" -#: common/api/action.py:51 +#: common/api/action.py:62 msgid "Request file format may be wrong" msgstr "上传的文件格式错误 或 其它类型资源的文件" @@ -3777,8 +3784,8 @@ msgstr "无效的ID,应为列表" #: common/db/fields.py:594 common/db/fields.py:599 #: common/serializers/fields.py:133 tickets/serializers/ticket/common.py:58 #: xpack/plugins/cloud/serializers/account_attrs.py:56 -#: xpack/plugins/cloud/serializers/account_attrs.py:79 -#: xpack/plugins/cloud/serializers/account_attrs.py:150 +#: xpack/plugins/cloud/serializers/account_attrs.py:80 +#: xpack/plugins/cloud/serializers/account_attrs.py:151 msgid "This field is required." msgstr "该字段是必填项。" @@ -3798,7 +3805,7 @@ msgstr "忽略的" msgid "discard time" msgstr "忽略时间" -#: common/db/models.py:33 users/models/user.py:859 +#: common/db/models.py:33 users/models/user.py:875 msgid "Updated by" msgstr "最后更新者" @@ -3953,12 +3960,10 @@ msgid "Children" msgstr "节点" #: common/serializers/fields.py:134 -#, python-brace-format msgid "Invalid pk \"{pk_value}\" - object does not exist." msgstr "错误的 pk \"{pk_value}\" - 对象不存在" #: common/serializers/fields.py:135 -#, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." msgstr "错误类型。期望 pk 值,收到 {data_type}。" @@ -4017,16 +4022,15 @@ msgstr "不能包含特殊字符" msgid "The mobile phone number format is incorrect" msgstr "手机号格式不正确" -#: jumpserver/conf.py:459 -#, python-brace-format +#: jumpserver/conf.py:462 msgid "The verification code is: {code}" msgstr "验证码为: {code}" -#: jumpserver/conf.py:464 +#: jumpserver/conf.py:467 msgid "Create account successfully" msgstr "创建账号成功" -#: jumpserver/conf.py:466 +#: jumpserver/conf.py:469 msgid "Your account has been created successfully" msgstr "你的账号已创建成功" @@ -4130,19 +4134,16 @@ msgid "Task {} args or kwargs error" msgstr "任务 {} 执行参数错误" #: ops/api/job.py:81 -#, python-brace-format msgid "" "Asset ({asset}) must have at least one of the following protocols added: " "SSH, SFTP, or WinRM" msgstr "资产({asset})至少要添加ssh,sftp,winrm其中一种协议" #: ops/api/job.py:82 -#, python-brace-format msgid "Asset ({asset}) authorization is missing SSH, SFTP, or WinRM protocol" msgstr "资产({asset})授权缺少ssh,sftp或winrm协议" #: ops/api/job.py:83 -#, python-brace-format msgid "Asset ({asset}) authorization lacks upload permissions" msgstr "资产({asset})授权缺少上传权限" @@ -4151,7 +4152,6 @@ msgid "Duplicate file exists" msgstr "存在同名文件" #: ops/api/job.py:173 -#, python-brace-format msgid "" "File size exceeds maximum limit. Please select a file smaller than {limit}MB" msgstr "文件大小超过最大限制。请选择小于 {limit}MB 的文件。" @@ -4431,22 +4431,18 @@ msgid "Terminal health check warning" msgstr "终端健康状况检查警告" #: ops/notifications.py:70 -#, python-brace-format msgid "The terminal is offline: {name}" msgstr "终端已离线: {name}" #: ops/notifications.py:75 -#, python-brace-format msgid "Disk used more than {max_threshold}%: => {value}" msgstr "硬盘使用率超过 {max_threshold}%: => {value}" #: ops/notifications.py:80 -#, python-brace-format msgid "Memory used more than {max_threshold}%: => {value}" msgstr "内存使用率超过 {max_threshold}%: => {value}" #: ops/notifications.py:85 -#, python-brace-format msgid "CPU load more than {max_threshold}: => {value}" msgstr "CPU 使用率超过 {max_threshold}: => {value}" @@ -4471,31 +4467,31 @@ msgstr "花费时间" msgid "You do not have permission for the current job." msgstr "你没有当前作业的权限。" -#: ops/tasks.py:50 +#: ops/tasks.py:52 msgid "Run ansible task" msgstr "运行 Ansible 任务" -#: ops/tasks.py:76 +#: ops/tasks.py:79 msgid "Run ansible task execution" msgstr "开始执行 Ansible 任务" -#: ops/tasks.py:89 +#: ops/tasks.py:94 msgid "Clear celery periodic tasks" msgstr "清理周期任务" -#: ops/tasks.py:110 +#: ops/tasks.py:115 msgid "Create or update periodic tasks" msgstr "创建或更新周期任务" -#: ops/tasks.py:118 +#: ops/tasks.py:123 msgid "Periodic check service performance" msgstr "周期检测服务性能" -#: ops/tasks.py:124 +#: ops/tasks.py:129 msgid "Clean up unexpected jobs" msgstr "清理异常作业" -#: ops/tasks.py:131 +#: ops/tasks.py:136 msgid "Clean job_execution db record" msgstr "清理作业中心执行历史" @@ -4586,7 +4582,7 @@ msgstr "默认组织" msgid "SYSTEM" msgstr "系统组织" -#: orgs/models.py:83 rbac/models/role.py:36 settings/models.py:183 +#: orgs/models.py:83 rbac/models/role.py:36 settings/models.py:184 #: terminal/models/applet/applet.py:42 msgid "Builtin" msgstr "内置的" @@ -4704,16 +4700,16 @@ msgstr "资产授权规则将要过期" msgid "asset permissions of organization {}" msgstr "组织 ({}) 的资产授权" -#: perms/serializers/permission.py:176 rbac/serializers/role.py:27 +#: perms/serializers/permission.py:179 rbac/serializers/role.py:27 #: users/serializers/group.py:54 users/serializers/group.py:60 msgid "Users amount" msgstr "用户数量" -#: perms/serializers/permission.py:177 +#: perms/serializers/permission.py:180 msgid "User groups amount" msgstr "用户组数量" -#: perms/serializers/permission.py:179 +#: perms/serializers/permission.py:182 msgid "Nodes amount" msgstr "节点数量" @@ -4819,7 +4815,7 @@ msgid "Scope" msgstr "范围" #: rbac/models/role.py:46 rbac/models/rolebinding.py:52 -#: users/models/user.py:825 +#: users/models/user.py:841 msgid "Role" msgstr "角色" @@ -4853,7 +4849,7 @@ msgstr "组织角色绑定" msgid "System role binding" msgstr "系统角色绑定" -#: rbac/serializers/permission.py:25 users/serializers/profile.py:108 +#: rbac/serializers/permission.py:25 users/serializers/profile.py:109 msgid "Perms" msgstr "权限" @@ -4882,7 +4878,7 @@ msgstr "工作台" msgid "Audit view" msgstr "审计台" -#: rbac/tree.py:27 settings/models.py:159 +#: rbac/tree.py:27 settings/models.py:160 msgid "System setting" msgstr "系统设置" @@ -4919,7 +4915,7 @@ msgid "My assets" msgstr "我的资产" #: rbac/tree.py:58 terminal/models/applet/applet.py:53 -#: terminal/models/applet/applet.py:328 terminal/models/applet/host.py:30 +#: terminal/models/applet/applet.py:327 terminal/models/applet/host.py:30 #: terminal/serializers/applet.py:15 msgid "Applet" msgstr "远程应用" @@ -4972,75 +4968,75 @@ msgstr "测试手机号 该字段是必填项。" msgid "Settings" msgstr "系统设置" -#: settings/models.py:36 users/models/preference.py:14 +#: settings/models.py:37 users/models/preference.py:14 msgid "Encrypted" msgstr "加密的" -#: settings/models.py:161 +#: settings/models.py:162 msgid "Can change email setting" msgstr "邮件设置" -#: settings/models.py:162 +#: settings/models.py:163 msgid "Can change auth setting" msgstr "认证设置" -#: settings/models.py:163 +#: settings/models.py:164 msgid "Can change auth ops" msgstr "任务中心设置" -#: settings/models.py:164 +#: settings/models.py:165 msgid "Can change auth ticket" msgstr "工单设置" -#: settings/models.py:165 +#: settings/models.py:166 msgid "Can change virtual app setting" msgstr "可以更改虚拟应用设置" -#: settings/models.py:166 +#: settings/models.py:167 msgid "Can change auth announcement" msgstr "公告设置" -#: settings/models.py:167 +#: settings/models.py:168 msgid "Can change vault setting" msgstr "可以更改 vault 设置" -#: settings/models.py:168 +#: settings/models.py:169 msgid "Can change chat ai setting" msgstr "可以修改聊天 AI 设置" -#: settings/models.py:169 +#: settings/models.py:170 msgid "Can change system msg sub setting" msgstr "消息订阅设置" -#: settings/models.py:170 +#: settings/models.py:171 msgid "Can change sms setting" msgstr "短信设置" -#: settings/models.py:171 +#: settings/models.py:172 msgid "Can change security setting" msgstr "安全设置" -#: settings/models.py:172 +#: settings/models.py:173 msgid "Can change clean setting" msgstr "定期清理" -#: settings/models.py:173 +#: settings/models.py:174 msgid "Can change interface setting" msgstr "界面设置" -#: settings/models.py:174 +#: settings/models.py:175 msgid "Can change license setting" msgstr "许可证设置" -#: settings/models.py:175 +#: settings/models.py:176 msgid "Can change terminal setting" msgstr "终端设置" -#: settings/models.py:176 +#: settings/models.py:177 msgid "Can change other setting" msgstr "其它设置" -#: settings/models.py:186 +#: settings/models.py:187 msgid "Chat prompt" msgstr "聊天提示" @@ -5197,11 +5193,11 @@ msgstr "用户属性映射" #: settings/serializers/auth/ldap.py:59 msgid "" -"User attr map present how to map LDAP user attr to jumpserver, username,name," -"email is jumpserver attr" +"User attr map present how to map LDAP user attr to jumpserver, " +"username,name,email is jumpserver attr" msgstr "" -"用户属性映射代表怎样将LDAP中用户属性映射到jumpserver用户上,username, name," -"email 是jumpserver的用户需要属性" +"用户属性映射代表怎样将LDAP中用户属性映射到jumpserver用户上,username, " +"name,email 是jumpserver的用户需要属性" #: settings/serializers/auth/ldap.py:77 msgid "Connect timeout (s)" @@ -5297,11 +5293,11 @@ msgstr "忽略 SSL 证书验证" #: settings/serializers/auth/oidc.py:38 msgid "" -"User attr map present how to map OpenID user attr to jumpserver, username," -"name,email is jumpserver attr" +"User attr map present how to map OpenID user attr to jumpserver, " +"username,name,email is jumpserver attr" msgstr "" -"用户属性映射代表怎样将OpenID中用户属性映射到jumpserver用户上,username, name," -"email 是jumpserver的用户需要属性" +"用户属性映射代表怎样将OpenID中用户属性映射到jumpserver用户上,username, " +"name,email 是jumpserver的用户需要属性" #: settings/serializers/auth/oidc.py:41 msgid "Enable PKCE" @@ -5479,7 +5475,6 @@ msgid "Business type(Service id)" msgstr "业务类型(Service id)" #: settings/serializers/auth/sms.py:80 -#, python-brace-format msgid "" "Template need contain {code} and Signature + template length does not exceed " "67 words. For example, your verification code is {code}, which is valid for " @@ -5489,7 +5484,6 @@ msgstr "" "{code}, 有效期为5分钟。请不要泄露给其他人。" #: settings/serializers/auth/sms.py:89 -#, python-brace-format msgid "The template needs to contain {code}" msgstr "模板需要包含 {code}" @@ -5518,7 +5512,7 @@ msgid "SSO auth key TTL" msgstr "令牌有效期" #: settings/serializers/auth/sso.py:20 -#: xpack/plugins/cloud/serializers/account_attrs.py:200 +#: xpack/plugins/cloud/serializers/account_attrs.py:201 msgid "Unit: second" msgstr "单位: 秒" @@ -5535,8 +5529,8 @@ msgid "" "External URL, email links or other system callbacks are used to access it, " "eg: http://dev.jumpserver.org:8080" msgstr "" -"外部可访问的 URL, 用于邮件链接或其它系统回调, 例如: http://dev.jumpserver." -"org:8080" +"外部可访问的 URL, 用于邮件链接或其它系统回调, 例如: http://" +"dev.jumpserver.org:8080" #: settings/serializers/basic.py:18 msgid "User guide url" @@ -5807,7 +5801,6 @@ msgid "Create user email content" msgstr "邮件的内容" #: settings/serializers/msg.py:80 -#, python-brace-format msgid "" "Tips: When creating a user, send the content of the email, support " "{username} {name} {email} label" @@ -6177,7 +6170,7 @@ msgid "Sync task Finish" msgstr "同步任务完成" #: settings/templates/ldap/_msg_import_ldap_user.html:6 -#: terminal/models/session/session.py:46 +#: terminal/models/session/session.py:47 msgid "Date end" msgstr "结束日期" @@ -6294,7 +6287,7 @@ msgstr "认证成功: {}" msgid "Get ldap users is None" msgstr "获取 LDAP 用户为 None" -#: settings/ws.py:205 +#: settings/ws.py:201 msgid "Total {}, success {}, failure {}" msgstr "总共 {},成功 {},失败 {}" @@ -6532,24 +6525,24 @@ msgstr "测试成功" msgid "Test failure: Please check configuration" msgstr "测试失败:请检查配置" -#: terminal/api/component/terminal.py:55 +#: terminal/api/component/terminal.py:57 msgid "Have online sessions" msgstr "有在线会话" -#: terminal/api/session/session.py:48 +#: terminal/api/session/session.py:49 #, python-format msgid "User %s %s session %s replay" msgstr "用户 %s %s 了会话 %s 的录像" -#: terminal/api/session/session.py:317 +#: terminal/api/session/session.py:321 msgid "Session does not exist: {}" msgstr "会话不存在: {}" -#: terminal/api/session/session.py:320 +#: terminal/api/session/session.py:324 msgid "Session is finished or the protocol not supported" msgstr "会话已经完成或协议不支持" -#: terminal/api/session/session.py:333 +#: terminal/api/session/session.py:337 tickets/api/ticket.py:140 msgid "User does not have permission" msgstr "用户没有权限" @@ -6731,12 +6724,12 @@ msgstr "只支持自定义平台" msgid "Missing type in platform.yml" msgstr "在 platform.yml 中缺少类型" -#: terminal/models/applet/applet.py:330 terminal/models/applet/host.py:36 +#: terminal/models/applet/applet.py:329 terminal/models/applet/host.py:36 #: terminal/models/applet/host.py:138 msgid "Hosting" msgstr "宿主机" -#: terminal/models/applet/applet.py:336 +#: terminal/models/applet/applet.py:335 msgid "Applet publication" msgstr "应用发布" @@ -6898,43 +6891,43 @@ msgstr "可以上传会话录像" msgid "Can download session replay" msgstr "可以下载会话录像" -#: terminal/models/session/session.py:35 +#: terminal/models/session/session.py:36 msgid "Account id" msgstr "账号 ID" -#: terminal/models/session/session.py:37 terminal/models/session/sharing.py:118 +#: terminal/models/session/session.py:38 terminal/models/session/sharing.py:118 msgid "Login from" msgstr "登录来源" -#: terminal/models/session/session.py:42 +#: terminal/models/session/session.py:43 msgid "Replay" msgstr "回放" -#: terminal/models/session/session.py:48 terminal/serializers/session.py:78 +#: terminal/models/session/session.py:49 terminal/serializers/session.py:78 msgid "Command amount" msgstr "命令数量" -#: terminal/models/session/session.py:49 terminal/serializers/session.py:30 +#: terminal/models/session/session.py:50 terminal/serializers/session.py:30 msgid "Error reason" msgstr "错误原因" -#: terminal/models/session/session.py:290 +#: terminal/models/session/session.py:292 msgid "Session record" msgstr "会话记录" -#: terminal/models/session/session.py:292 +#: terminal/models/session/session.py:294 msgid "Can monitor session" msgstr "可以监控会话" -#: terminal/models/session/session.py:293 +#: terminal/models/session/session.py:295 msgid "Can share session" msgstr "可以分享会话" -#: terminal/models/session/session.py:294 +#: terminal/models/session/session.py:296 msgid "Can terminate session" msgstr "可以终断会话" -#: terminal/models/session/session.py:295 +#: terminal/models/session/session.py:297 msgid "Can validate session action perm" msgstr "可以验证会话动作权限" @@ -7225,19 +7218,15 @@ msgstr "" #: terminal/serializers/endpoint.py:64 msgid "" -"The assets within this IP range, the following endpoint will be used for the " -"connection" -msgstr "该 IP 范围内的资产,将使用下面的端点进行连接" +"The assets within this IP range or Host, the following endpoint will be used " +"for the connection" +msgstr "此 IP 范围或主机内的资产,将使用下面的端点进行连接" #: terminal/serializers/endpoint.py:65 msgid "" "If asset IP addresses under different endpoints conflict, use asset labels" msgstr "如果不同端点下的资产 IP 有冲突,使用资产标签实现" -#: terminal/serializers/endpoint.py:69 -msgid "Asset IP" -msgstr "资产 IP" - #: terminal/serializers/session.py:25 terminal/serializers/session.py:53 msgid "Can replay" msgstr "是否可重放" @@ -7309,8 +7298,8 @@ msgstr "端点后缀" msgid "HOST" msgstr "主机" -#: terminal/serializers/storage.py:146 users/models/user.py:845 -#: xpack/plugins/cloud/serializers/account_attrs.py:213 +#: terminal/serializers/storage.py:146 users/models/user.py:861 +#: xpack/plugins/cloud/serializers/account_attrs.py:214 msgid "Private key" msgstr "ssh私钥" @@ -7728,7 +7717,7 @@ msgstr "工单快照" msgid "Please try again" msgstr "请再次尝试" -#: tickets/models/ticket/general.py:481 +#: tickets/models/ticket/general.py:484 msgid "Super ticket" msgstr "超级工单" @@ -8021,13 +8010,13 @@ msgstr "复制你的公钥到这里" msgid "Public key should not be the same as your old one." msgstr "不能和原来的密钥相同" -#: users/forms/profile.py:161 users/serializers/profile.py:76 -#: users/serializers/profile.py:164 users/serializers/profile.py:191 +#: users/forms/profile.py:161 users/serializers/profile.py:77 +#: users/serializers/profile.py:165 users/serializers/profile.py:192 msgid "Not a valid ssh public key" msgstr "SSH密钥不合法" -#: users/forms/profile.py:172 users/models/user.py:848 -#: xpack/plugins/cloud/serializers/account_attrs.py:210 +#: users/forms/profile.py:172 users/models/user.py:864 +#: xpack/plugins/cloud/serializers/account_attrs.py:211 msgid "Public key" msgstr "SSH公钥" @@ -8035,78 +8024,78 @@ msgstr "SSH公钥" msgid "Preference" msgstr "用户设置" -#: users/models/user.py:657 users/serializers/profile.py:94 +#: users/models/user.py:673 users/serializers/profile.py:95 msgid "Force enable" msgstr "强制启用" -#: users/models/user.py:763 +#: users/models/user.py:779 msgid "Lark" msgstr "" -#: users/models/user.py:827 users/serializers/user.py:177 +#: users/models/user.py:843 users/serializers/user.py:177 msgid "Is service account" msgstr "服务账号" -#: users/models/user.py:829 +#: users/models/user.py:845 msgid "Avatar" msgstr "头像" -#: users/models/user.py:832 +#: users/models/user.py:848 msgid "Wechat" msgstr "微信" -#: users/models/user.py:835 users/serializers/user.py:113 +#: users/models/user.py:851 users/serializers/user.py:113 msgid "Phone" msgstr "手机" -#: users/models/user.py:841 +#: users/models/user.py:857 msgid "OTP secret key" msgstr "OTP 密钥" # msgid "Private key" # msgstr "ssh私钥" -#: users/models/user.py:853 users/serializers/profile.py:128 +#: users/models/user.py:869 users/serializers/profile.py:129 #: users/serializers/user.py:174 msgid "Is first login" msgstr "首次登录" -#: users/models/user.py:863 +#: users/models/user.py:879 msgid "Date password last updated" msgstr "最后更新密码日期" -#: users/models/user.py:866 +#: users/models/user.py:882 msgid "Need update password" msgstr "需要更新密码" -#: users/models/user.py:868 +#: users/models/user.py:884 msgid "Date api key used" msgstr "Api key 最后使用日期" -#: users/models/user.py:1001 +#: users/models/user.py:1017 msgid "Can not delete admin user" msgstr "无法删除管理员用户" -#: users/models/user.py:1029 +#: users/models/user.py:1045 msgid "Can invite user" msgstr "可以邀请用户" -#: users/models/user.py:1030 +#: users/models/user.py:1046 msgid "Can remove user" msgstr "可以移除用户" -#: users/models/user.py:1031 +#: users/models/user.py:1047 msgid "Can match user" msgstr "可以匹配用户" -#: users/models/user.py:1040 +#: users/models/user.py:1056 msgid "Administrator" msgstr "管理员" -#: users/models/user.py:1043 +#: users/models/user.py:1059 msgid "Administrator is the super user of system" msgstr "Administrator是初始的超级管理员" -#: users/models/user.py:1068 +#: users/models/user.py:1084 msgid "User password history" msgstr "用户密码历史" @@ -8157,7 +8146,7 @@ msgstr "文件加密密码" msgid "Confirm file encryption password" msgstr "确认文件加密密码" -#: users/serializers/preference/lina.py:31 users/serializers/profile.py:48 +#: users/serializers/preference/lina.py:31 users/serializers/profile.py:49 msgid "The newly set password is inconsistent" msgstr "两次密码不一致" @@ -8224,15 +8213,15 @@ msgstr "图形化" msgid "Command line" msgstr "命令行" -#: users/serializers/profile.py:29 +#: users/serializers/profile.py:30 msgid "The old password is incorrect" msgstr "旧密码错误" -#: users/serializers/profile.py:36 users/serializers/profile.py:178 +#: users/serializers/profile.py:37 users/serializers/profile.py:179 msgid "Password does not match security rules" msgstr "密码不满足安全规则" -#: users/serializers/profile.py:40 +#: users/serializers/profile.py:41 msgid "The new password cannot be the last {} passwords" msgstr "新密码不能是最近 {} 次的密码" @@ -8786,10 +8775,8 @@ msgid "Fully synchronous" msgstr "完全同步" #: xpack/plugins/cloud/models.py:106 -#, fuzzy -#| msgid "permed assets" msgid "Release assets" -msgstr "授权的资产" +msgstr "释放的资产" #: xpack/plugins/cloud/models.py:111 msgid "Date last sync" @@ -9119,51 +9106,59 @@ msgstr "租户 ID" msgid "Subscription ID" msgstr "订阅 ID" -#: xpack/plugins/cloud/serializers/account_attrs.py:98 -#: xpack/plugins/cloud/serializers/account_attrs.py:102 -#: xpack/plugins/cloud/serializers/account_attrs.py:126 -#: xpack/plugins/cloud/serializers/account_attrs.py:156 -#: xpack/plugins/cloud/serializers/account_attrs.py:206 +#: xpack/plugins/cloud/serializers/account_attrs.py:74 +msgid "Auto node classification" +msgstr "自动节点分类" + +#: xpack/plugins/cloud/serializers/account_attrs.py:93 +msgid "domain_name" +msgstr "启用网域" + +#: xpack/plugins/cloud/serializers/account_attrs.py:99 +#: xpack/plugins/cloud/serializers/account_attrs.py:103 +#: xpack/plugins/cloud/serializers/account_attrs.py:127 +#: xpack/plugins/cloud/serializers/account_attrs.py:157 +#: xpack/plugins/cloud/serializers/account_attrs.py:207 msgid "API Endpoint" msgstr "API 端点" -#: xpack/plugins/cloud/serializers/account_attrs.py:108 +#: xpack/plugins/cloud/serializers/account_attrs.py:109 msgid "Auth url" msgstr "认证地址" -#: xpack/plugins/cloud/serializers/account_attrs.py:109 +#: xpack/plugins/cloud/serializers/account_attrs.py:110 msgid "eg: http://openstack.example.com:5000/v3" msgstr "如: http://openstack.example.com:5000/v3" -#: xpack/plugins/cloud/serializers/account_attrs.py:112 +#: xpack/plugins/cloud/serializers/account_attrs.py:113 msgid "User domain" msgstr "用户域" -#: xpack/plugins/cloud/serializers/account_attrs.py:127 +#: xpack/plugins/cloud/serializers/account_attrs.py:128 msgid "Cert File" msgstr "证书文件" -#: xpack/plugins/cloud/serializers/account_attrs.py:128 +#: xpack/plugins/cloud/serializers/account_attrs.py:129 msgid "Key File" msgstr "密钥文件" -#: xpack/plugins/cloud/serializers/account_attrs.py:144 +#: xpack/plugins/cloud/serializers/account_attrs.py:145 msgid "Service account key" msgstr "服务账号密钥" -#: xpack/plugins/cloud/serializers/account_attrs.py:145 +#: xpack/plugins/cloud/serializers/account_attrs.py:146 msgid "The file is in JSON format" msgstr "JSON 格式的文件" -#: xpack/plugins/cloud/serializers/account_attrs.py:163 +#: xpack/plugins/cloud/serializers/account_attrs.py:164 msgid "IP address invalid `{}`, {}" msgstr "IP 地址无效: `{}`, {}" -#: xpack/plugins/cloud/serializers/account_attrs.py:179 +#: xpack/plugins/cloud/serializers/account_attrs.py:180 msgid "Such as: 192.168.1.0/24, 10.0.0.0-10.0.0.255" msgstr "例: 192.168.1.0/24,10.0.0.0-10.0.0.255" -#: xpack/plugins/cloud/serializers/account_attrs.py:182 +#: xpack/plugins/cloud/serializers/account_attrs.py:183 msgid "" "The port is used to detect the validity of the IP address. When the " "synchronization task is executed, only the valid IP address will be " @@ -9172,23 +9167,23 @@ msgstr "" "端口用来检测 IP 地址的有效性,在同步任务执行时,只会同步有效的 IP 地址。
" "如果端口为 0,则表示所有 IP 地址均有效。" -#: xpack/plugins/cloud/serializers/account_attrs.py:190 +#: xpack/plugins/cloud/serializers/account_attrs.py:191 msgid "Hostname prefix" msgstr "主机名前缀" -#: xpack/plugins/cloud/serializers/account_attrs.py:193 +#: xpack/plugins/cloud/serializers/account_attrs.py:194 msgid "IP segment" msgstr "IP 网段" -#: xpack/plugins/cloud/serializers/account_attrs.py:197 +#: xpack/plugins/cloud/serializers/account_attrs.py:198 msgid "Test port" msgstr "测试端口" -#: xpack/plugins/cloud/serializers/account_attrs.py:200 +#: xpack/plugins/cloud/serializers/account_attrs.py:201 msgid "Test timeout" msgstr "测试超时时间" -#: xpack/plugins/cloud/serializers/account_attrs.py:216 +#: xpack/plugins/cloud/serializers/account_attrs.py:217 msgid "Project" msgstr "project" @@ -9288,6 +9283,5 @@ msgstr "企业专业版" msgid "Ultimate edition" msgstr "企业旗舰版" -#: xpack/plugins/cloud/serializers/account_attrs.py:74 -msgid "Auto node classification" -msgstr "自动节点分类" +#~ msgid "Asset IP" +#~ msgstr "资产 IP" diff --git a/apps/terminal/serializers/endpoint.py b/apps/terminal/serializers/endpoint.py index 2b734f71e..07bd1d121 100644 --- a/apps/terminal/serializers/endpoint.py +++ b/apps/terminal/serializers/endpoint.py @@ -1,7 +1,7 @@ from django.utils.translation import gettext_lazy as _ from rest_framework import serializers -from acls.serializers.rules import ip_group_child_validator, ip_group_help_text +from acls.serializers.rules import address_validator, ip_group_help_text from common.serializers import BulkModelSerializer from common.serializers.fields import ObjectRelatedField from ..models import Endpoint, EndpointRule @@ -61,13 +61,13 @@ class EndpointSerializer(BulkModelSerializer): class EndpointRuleSerializer(BulkModelSerializer): _ip_group_help_text = '{}, {}
{}'.format( - _('The assets within this IP range, the following endpoint will be used for the connection'), + _('The assets within this IP range or Host, the following endpoint will be used for the connection'), _('If asset IP addresses under different endpoints conflict, use asset labels'), ip_group_help_text, ) ip_group = serializers.ListField( - default=['*'], label=_('Asset IP'), help_text=_ip_group_help_text, - child=serializers.CharField(max_length=1024, validators=[ip_group_child_validator]) + default=['*'], label=_('Address'), help_text=_ip_group_help_text, + child=serializers.CharField(max_length=1024, validators=[address_validator]), ) endpoint = ObjectRelatedField( allow_null=True, required=False, queryset=Endpoint.objects, label=_('Endpoint')