diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 2e7a24b89..c125e16af 100644 Binary files a/apps/locale/zh/LC_MESSAGES/django.mo and b/apps/locale/zh/LC_MESSAGES/django.mo differ diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 16eab6dd9..8feb8f959 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Jumpserver 0.3.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-19 18:16+0800\n" +"POT-Creation-Date: 2019-06-20 11:41+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: ibuler \n" "Language-Team: Jumpserver team\n" @@ -210,7 +210,7 @@ msgstr "参数" #: assets/models/cluster.py:28 assets/models/cmd_filter.py:25 #: assets/models/cmd_filter.py:58 assets/models/group.py:21 #: assets/templates/assets/admin_user_detail.html:68 -#: assets/templates/assets/asset_detail.html:129 +#: assets/templates/assets/asset_detail.html:128 #: assets/templates/assets/cmd_filter_detail.html:77 #: assets/templates/assets/domain_detail.html:72 #: assets/templates/assets/system_user_detail.html:100 @@ -265,7 +265,7 @@ msgstr "创建日期" #: assets/models/domain.py:53 assets/models/group.py:23 #: assets/models/label.py:23 assets/templates/assets/admin_user_detail.html:72 #: assets/templates/assets/admin_user_list.html:53 -#: assets/templates/assets/asset_detail.html:137 +#: assets/templates/assets/asset_detail.html:136 #: assets/templates/assets/cmd_filter_detail.html:65 #: assets/templates/assets/cmd_filter_list.html:27 #: assets/templates/assets/cmd_filter_rule_list.html:62 @@ -619,8 +619,8 @@ msgid "Test if the assets under the node are connectable: {}" msgstr "测试节点下资产是否可连接: {}" #: assets/forms/asset.py:45 assets/models/asset.py:103 -#: assets/models/user.py:134 assets/templates/assets/asset_detail.html:195 -#: assets/templates/assets/asset_detail.html:203 +#: assets/models/user.py:134 assets/templates/assets/asset_detail.html:194 +#: assets/templates/assets/asset_detail.html:202 #: assets/templates/assets/system_user_asset.html:83 #: perms/models/asset_permission.py:38 #: xpack/plugins/change_auth_plan/models.py:72 @@ -629,7 +629,7 @@ msgstr "节点" #: assets/forms/asset.py:48 assets/forms/asset.py:83 assets/models/asset.py:107 #: assets/models/cluster.py:19 assets/models/user.py:92 -#: assets/templates/assets/asset_detail.html:81 templates/_nav.html:24 +#: assets/templates/assets/asset_detail.html:80 templates/_nav.html:24 #: xpack/plugins/cloud/models.py:124 #: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:65 #: xpack/plugins/orgs/templates/orgs/org_list.html:18 @@ -647,7 +647,7 @@ msgstr "标签" #: assets/forms/asset.py:54 assets/forms/asset.py:89 assets/models/asset.py:102 #: assets/models/domain.py:26 assets/models/domain.py:52 -#: assets/templates/assets/asset_detail.html:85 +#: assets/templates/assets/asset_detail.html:84 #: assets/templates/assets/user_asset_list.html:173 #: xpack/plugins/orgs/templates/orgs/org_list.html:17 msgid "Domain" @@ -858,14 +858,14 @@ msgstr "主机名" msgid "Protocol" msgstr "协议" -#: assets/models/asset.py:101 assets/templates/assets/asset_detail.html:109 +#: assets/models/asset.py:101 assets/templates/assets/asset_detail.html:108 #: assets/templates/assets/user_asset_list.html:170 msgid "Platform" msgstr "系统平台" #: assets/models/asset.py:104 assets/models/cmd_filter.py:21 #: assets/models/domain.py:54 assets/models/label.py:22 -#: assets/templates/assets/asset_detail.html:117 +#: assets/templates/assets/asset_detail.html:116 #: assets/templates/assets/user_asset_list.html:174 msgid "Is active" msgstr "激活" @@ -874,19 +874,19 @@ msgstr "激活" msgid "Public IP" msgstr "公网IP" -#: assets/models/asset.py:111 assets/templates/assets/asset_detail.html:125 +#: assets/models/asset.py:111 assets/templates/assets/asset_detail.html:124 msgid "Asset number" msgstr "资产编号" -#: assets/models/asset.py:114 assets/templates/assets/asset_detail.html:89 +#: assets/models/asset.py:114 assets/templates/assets/asset_detail.html:88 msgid "Vendor" msgstr "制造商" -#: assets/models/asset.py:115 assets/templates/assets/asset_detail.html:93 +#: assets/models/asset.py:115 assets/templates/assets/asset_detail.html:92 msgid "Model" msgstr "型号" -#: assets/models/asset.py:116 assets/templates/assets/asset_detail.html:121 +#: assets/models/asset.py:116 assets/templates/assets/asset_detail.html:120 msgid "Serial number" msgstr "序列号" @@ -907,7 +907,7 @@ msgstr "CPU核数" msgid "CPU vcpus" msgstr "CPU总数" -#: assets/models/asset.py:122 assets/templates/assets/asset_detail.html:101 +#: assets/models/asset.py:122 assets/templates/assets/asset_detail.html:100 msgid "Memory" msgstr "内存" @@ -919,7 +919,7 @@ msgstr "硬盘大小" msgid "Disk info" msgstr "硬盘信息" -#: assets/models/asset.py:126 assets/templates/assets/asset_detail.html:113 +#: assets/models/asset.py:126 assets/templates/assets/asset_detail.html:112 #: assets/templates/assets/user_asset_list.html:171 msgid "OS" msgstr "操作系统" @@ -937,7 +937,7 @@ msgid "Hostname raw" msgstr "主机名原始" #: assets/models/asset.py:131 assets/templates/assets/asset_create.html:46 -#: assets/templates/assets/asset_detail.html:232 templates/_nav.html:26 +#: assets/templates/assets/asset_detail.html:231 templates/_nav.html:26 msgid "Labels" msgstr "标签管理" @@ -1206,24 +1206,24 @@ msgstr "登录模式" msgid "%(value)s is not an even number" msgstr "%(value)s is not an even number" -#: assets/serializers/asset.py:26 assets/templates/assets/asset_create.html:24 +#: assets/serializers/asset.py:46 assets/templates/assets/asset_create.html:24 msgid "Protocols" msgstr "协议组" -#: assets/serializers/asset.py:52 +#: assets/serializers/asset.py:73 msgid "Hardware info" msgstr "硬件信息" -#: assets/serializers/asset.py:53 assets/serializers/asset_user.py:29 +#: assets/serializers/asset.py:74 assets/serializers/asset_user.py:29 #: assets/templates/assets/_asset_user_list.html:18 msgid "Connectivity" msgstr "连接" -#: assets/serializers/asset.py:54 orgs/mixins.py:223 +#: assets/serializers/asset.py:75 orgs/mixins.py:223 msgid "Org name" msgstr "组织名称" -#: assets/serializers/asset.py:70 +#: assets/serializers/asset.py:93 msgid "Protocol duplicate: {}" msgstr "协议重复: {}" @@ -1400,7 +1400,7 @@ msgid "Please input password" msgstr "请输入密码" #: assets/templates/assets/_asset_user_auth_update_modal.html:68 -#: assets/templates/assets/asset_detail.html:312 +#: assets/templates/assets/asset_detail.html:311 #: users/templates/users/user_detail.html:307 #: users/templates/users/user_detail.html:334 #: xpack/plugins/interface/views.py:35 @@ -1437,15 +1437,13 @@ msgid "Datetime" msgstr "日期" #: assets/templates/assets/_asset_user_list.html:61 -#, fuzzy -#| msgid "View auth" msgid "View" msgstr "查看认证" #: assets/templates/assets/_asset_user_list.html:63 #: assets/templates/assets/admin_user_assets.html:61 #: assets/templates/assets/asset_asset_user_list.html:57 -#: assets/templates/assets/asset_detail.html:183 +#: assets/templates/assets/asset_detail.html:182 #: assets/templates/assets/system_user_asset.html:63 #: assets/templates/assets/system_user_detail.html:151 msgid "Test" @@ -1535,7 +1533,7 @@ msgstr "快速更新" #: assets/templates/assets/admin_user_assets.html:58 #: assets/templates/assets/asset_asset_user_list.html:54 -#: assets/templates/assets/asset_detail.html:180 +#: assets/templates/assets/asset_detail.html:179 msgid "Test connective" msgstr "测试可连接性" @@ -1551,7 +1549,7 @@ msgid "Select nodes" msgstr "选择节点" #: assets/templates/assets/admin_user_detail.html:100 -#: assets/templates/assets/asset_detail.html:212 +#: assets/templates/assets/asset_detail.html:211 #: assets/templates/assets/asset_list.html:682 #: assets/templates/assets/cmd_filter_detail.html:106 #: assets/templates/assets/system_user_asset.html:100 @@ -1649,7 +1647,7 @@ msgid "Asset users of" msgstr "资产用户" #: assets/templates/assets/asset_asset_user_list.html:47 -#: assets/templates/assets/asset_detail.html:149 +#: assets/templates/assets/asset_detail.html:148 #: terminal/templates/terminal/session_detail.html:81 #: users/templates/users/user_detail.html:138 #: users/templates/users/user_profile.html:146 @@ -1668,21 +1666,21 @@ msgstr "选择需要修改属性" msgid "Select all" msgstr "全选" -#: assets/templates/assets/asset_detail.html:97 +#: assets/templates/assets/asset_detail.html:96 msgid "CPU" msgstr "CPU" -#: assets/templates/assets/asset_detail.html:105 +#: assets/templates/assets/asset_detail.html:104 msgid "Disk" msgstr "硬盘" -#: assets/templates/assets/asset_detail.html:133 +#: assets/templates/assets/asset_detail.html:132 #: users/templates/users/user_detail.html:115 #: users/templates/users/user_profile.html:104 msgid "Date joined" msgstr "创建日期" -#: assets/templates/assets/asset_detail.html:155 +#: assets/templates/assets/asset_detail.html:154 #: assets/templates/assets/user_asset_list.html:46 #: perms/models/asset_permission.py:60 perms/models/base.py:38 #: perms/templates/perms/asset_permission_create_update.html:55 @@ -1698,11 +1696,11 @@ msgstr "创建日期" msgid "Active" msgstr "激活中" -#: assets/templates/assets/asset_detail.html:172 +#: assets/templates/assets/asset_detail.html:171 msgid "Refresh hardware" msgstr "更新硬件信息" -#: assets/templates/assets/asset_detail.html:175 +#: assets/templates/assets/asset_detail.html:174 msgid "Refresh" msgstr "刷新" @@ -5401,8 +5399,6 @@ msgid "Password rules" msgstr "密码规则" #: xpack/plugins/change_auth_plan/models.py:213 -#, fuzzy -#| msgid "For security, do not change root user's password" msgid "For security, do not change {} user's password" msgstr "为了安全,禁止更改 {} 用户的密码" @@ -5942,8 +5938,8 @@ msgstr "创建组织" msgid "Update org" msgstr "更新组织" -#: xpack/plugins/vault/meta.py:11 xpack/plugins/vault/views.py:23 -#: xpack/plugins/vault/views.py:38 +#: xpack/plugins/vault/meta.py:11 xpack/plugins/vault/views.py:22 +#: xpack/plugins/vault/views.py:37 msgid "Vault" msgstr "密码匣子" @@ -5951,11 +5947,11 @@ msgstr "密码匣子" msgid "Import vault" msgstr "导入密码" -#: xpack/plugins/vault/views.py:24 +#: xpack/plugins/vault/views.py:23 msgid "vault list" msgstr "密码匣子" -#: xpack/plugins/vault/views.py:39 +#: xpack/plugins/vault/views.py:38 msgid "vault create" msgstr "创建" diff --git a/apps/perms/mixins.py b/apps/perms/mixins.py index 88c851adc..f1d7fac1e 100644 --- a/apps/perms/mixins.py +++ b/apps/perms/mixins.py @@ -1,7 +1,6 @@ # ~*~ coding: utf-8 ~*~ # - from orgs.utils import set_to_root_org __all__ = [ @@ -116,4 +115,3 @@ class ChangeOrgIfNeedMixin(object): def get(self, request, *args, **kwargs): self.change_org_if_need(request, kwargs) return super().get(request, *args, **kwargs) - diff --git a/apps/settings/api.py b/apps/settings/api.py index d399d207c..37d63bef1 100644 --- a/apps/settings/api.py +++ b/apps/settings/api.py @@ -39,7 +39,7 @@ class MailTestingAPI(APIView): subject = "Test" message = "Test smtp setting" email_from = email_from or email_host_user - send_mail(subject, message, email_from, [email_host_user]) + send_mail(subject, message, email_from, [email_from]) except Exception as e: return Response({"error": str(e)}, status=401)