merge: with remote

pull/13305/head
ibuler 2024-05-27 16:46:13 +08:00
commit f95cbd6977
27 changed files with 203 additions and 143 deletions

View File

@ -39,7 +39,7 @@ class UserLoginReminderMsg(UserMessage):
class AssetLoginReminderMsg(UserMessage):
subject = _('Asset login reminder')
subject = _('User login alert for asset')
def __init__(self, user, asset: Asset, login_user: User, account: Account, input_username):
self.asset = asset

View File

@ -1,13 +1,16 @@
{% load i18n %}
<h3>{% trans 'Respectful' %}: {{ recipient.name }}[{{ recipient.username }}]</h3>
<h3>{% trans 'Dear' %}: {{ recipient.name }}[{{ recipient.username }}]</h3>
<hr>
<p><strong>{% trans 'User' %}:</strong> [{{ name }}({{ username }})]</p>
<p><strong>{% trans 'Assets' %}:</strong> [{{ asset }}]</p>
<p><strong>{% trans 'Account' %}:</strong> [{{ account_name }}({{ account }})]</p>
<p>{% trans 'We would like to inform you that a user has recently logged into the following asset:' %}<p>
<p><strong>{% trans 'Asset details' %}:</strong></p>
<ul>
<li><strong>{% trans 'User' %}:</strong> [{{ name }}({{ username }})]</li>
<li><strong>{% trans 'Assets' %}:</strong> [{{ asset }}]</li>
<li><strong>{% trans 'Account' %}:</strong> [{{ account_name }}({{ account }})]</li>
</ul>
<hr>
<p>{% trans 'The user has just logged in to the asset. Please ensure that this is an authorized operation. If you suspect that this is an unauthorized access, please take appropriate measures immediately.' %}</p>
<p>{% trans 'Thank you' %}</p>
<p>{% trans 'Please review the login activity to ensure the security and proper usage of the asset. If you did not authorize this login or if you notice any suspicious activity, please take the necessary actions immediately.' %}</p>
<p>{% trans 'Thank you for your attention to this matter' %}</p>

View File

@ -1,14 +1,16 @@
{% load i18n %}
<h3>{% trans 'Respectful' %}: {{ recipient.name }}[{{ recipient.username }}]</h3>
<h3>{% trans 'Dear' %}: {{ recipient.name }}[{{ recipient.username }}]</h3>
<hr>
<p><strong>{% trans 'User' %}:</strong> [{{ username }}]</p>
<p><strong>IP:</strong> [{{ ip }}]</p>
<p><strong>{% trans 'Login city' %}:</strong> [{{ city }}]</p>
<p><strong>{% trans 'User agent' %}:</strong> [{{ user_agent }}]</p>
<p>{% trans 'We would like to inform you that a user has recently logged:' %}<p>
<p><strong>{% trans 'User details' %}:</strong></p>
<ul>
<li><strong>{% trans 'User' %}:</strong> [{{ username }}]</li>
<li><strong>IP:</strong> [{{ ip }}]</li>
<li><strong>{% trans 'Login city' %}:</strong> [{{ city }}]</li>
<li><strong>{% trans 'User agent' %}:</strong> [{{ user_agent }}]</li>
</ul>
<hr>
<p>{% trans 'The user has just successfully logged into the system. Please ensure that this is an authorized operation. If you suspect that this is an unauthorized access, please take appropriate measures immediately.' %}</p>
<p>{% trans 'Thank you' %}</p>
<p>{% trans 'Please review the login activity to ensure the security and proper usage of the asset. If you did not authorize this login or if you notice any suspicious activity, please take the necessary actions immediately.' %}</p>
<p>{% trans 'Thank you for your attention to this matter' %}</p>

View File

@ -1,15 +1,15 @@
{% load i18n %}
<p>{% trans 'Hello' %} {{ name }},</p>
<p>{% trans 'Dear' %} {{ name }},</p>
<p>
{% trans 'Your password has just been successfully updated' %}
</p>
<p>
<b>{% trans 'IP' %}:</b> {{ ip_address }} <br />
<b>{% trans 'IP' %}:</b> {{ ip_address }} <br/>
<b>{% trans 'Browser' %}:</b> {{ browser }}
</p>
-
<p>
{% trans 'If the password update was not initiated by you, your account may have security issues' %} <br />
{% trans 'If the password update was not initiated by you, your account may have security issues' %} <br/>
{% trans 'If you have any questions, you can contact the administrator' %}
</p>

View File

@ -1,15 +1,15 @@
{% load i18n %}
<p>{% trans 'Hello' %} {{ name }},</p>
<p>{% trans 'Dear' %} {{ name }},</p>
<p>
{% trans 'Your public key has just been successfully updated' %}
</p>
<p>
<b>{% trans 'IP' %}:</b> {{ ip_address }} <br />
<b>{% trans 'IP' %}:</b> {{ ip_address }} <br/>
<b>{% trans 'Browser' %}:</b> {{ browser }}
</p>
-
<p>
{% trans 'If the public key update was not initiated by you, your account may have security issues' %} <br />
{% trans 'If the public key update was not initiated by you, your account may have security issues' %} <br/>
{% trans 'If you have any questions, you can contact the administrator' %}
</p>

View File

@ -12,6 +12,7 @@ def _find(attr):
def add_encrypted_field_set(label):
return
if label:
with translation.override('en'):
encrypted_field_set.add(str(label))

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-27 16:41+0800\n"
"POT-Creation-Date: 2024-05-22 18:28+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -858,7 +858,7 @@ msgstr ""
#: accounts/serializers/account/account.py:453 acls/serializers/base.py:116
#: acls/templates/acls/asset_login_reminder.html:5
#: acls/templates/acls/user_login_reminder.html:5
#: acls/templates/acls/user_login_reminder.html:7
#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:54
#: audits/models.py:90 audits/models.py:172 audits/models.py:269
#: audits/serializers.py:171 authentication/models/connection_token.py:32
@ -1095,7 +1095,6 @@ msgstr ""
#: accounts/templates/accounts/change_secret_failed_info.html:5
#: acls/templates/acls/asset_login_reminder.html:3
#: acls/templates/acls/user_login_reminder.html:3
msgid "Respectful"
msgstr ""
@ -1263,7 +1262,7 @@ msgid "User login reminder"
msgstr ""
#: acls/notifications.py:42
msgid "Asset login reminder"
msgid "User login alert for asset"
msgstr ""
#: acls/serializers/base.py:11 acls/serializers/login_acl.py:11
@ -1324,27 +1323,44 @@ msgid ""
msgstr ""
#: acls/templates/acls/asset_login_reminder.html:12
#: acls/templates/acls/user_login_reminder.html:13
msgid "Thank you"
msgstr ""
#: acls/templates/acls/user_login_reminder.html:7 audits/models.py:194
#: acls/templates/acls/user_login_reminder.html:3
msgid "Dear"
msgstr ""
#: acls/templates/acls/user_login_reminder.html:5
msgid ""
"We would like to inform you that a user has recently logged into the "
"following asset:"
msgstr ""
#: acls/templates/acls/user_login_reminder.html:6
msgid "Asset details"
msgstr ""
#: acls/templates/acls/user_login_reminder.html:9 audits/models.py:194
#: audits/models.py:263
#: authentication/templates/authentication/_msg_different_city.html:11
#: tickets/models/ticket/login_confirm.py:11
msgid "Login city"
msgstr ""
#: acls/templates/acls/user_login_reminder.html:8 audits/models.py:197
#: acls/templates/acls/user_login_reminder.html:10 audits/models.py:197
#: audits/models.py:264 audits/serializers.py:68
msgid "User agent"
msgstr ""
#: acls/templates/acls/user_login_reminder.html:11
#: acls/templates/acls/user_login_reminder.html:13
msgid ""
"The user has just successfully logged into the system. Please ensure that "
"this is an authorized operation. If you suspect that this is an unauthorized "
"access, please take appropriate measures immediately."
"Please review the login activity to ensure the security and proper usage of "
"the asset. If you did not authorize this login or if you notice any "
"suspicious activity, please take the necessary actions immediately."
msgstr ""
#: acls/templates/acls/user_login_reminder.html:15
msgid "Thank you for your attention to this matter"
msgstr ""
#: assets/api/asset/asset.py:180
@ -3975,7 +3991,7 @@ msgstr ""
#: jumpserver/context_processor.py:14
msgid "JumpServer Open Source Bastion Host"
msgstr ""
msgstr "JumpServer"
#: jumpserver/views/celery_flower.py:22
msgid "<h1>Flower service unavailable, check it</h1>"
@ -4390,12 +4406,12 @@ msgid "Server performance"
msgstr ""
#: ops/notifications.py:25
msgid "Terminal health check warning"
msgid "Component health check warning"
msgstr ""
#: ops/notifications.py:70
#, python-brace-format
msgid "The terminal is offline: {name}"
msgid "The component is offline: {name}"
msgstr ""
#: ops/notifications.py:75
@ -4685,7 +4701,7 @@ msgid "day"
msgstr ""
#: perms/notifications.py:15
msgid "You permed assets is about to expire"
msgid "The asset you authorized is about to expire"
msgstr ""
#: perms/notifications.py:20
@ -5802,10 +5818,6 @@ msgstr ""
msgid "Virtual app"
msgstr ""
#: settings/serializers/feature.py:148
msgid "vApp"
msgstr ""
#: settings/serializers/feature.py:150
msgid ""
"Virtual applications, you can use the Linux operating system as an "
@ -6223,7 +6235,7 @@ msgid "Registration periodic import ldap user task"
msgstr ""
#: settings/templates/ldap/_msg_import_ldap_user.html:2
msgid "Sync task Finish"
msgid "Sync task finish"
msgstr ""
#: settings/templates/ldap/_msg_import_ldap_user.html:6
@ -6479,7 +6491,7 @@ msgstr ""
#: templates/_without_nav_base.html:26
msgid "Home page"
msgstr ""
msgstr "Home"
#: templates/resource_download.html:18 templates/resource_download.html:33
#: users/const.py:65

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-27 16:41+0800\n"
"POT-Creation-Date: 2024-05-22 18:28+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -318,7 +318,7 @@ msgstr "ソース ID"
#: accounts/serializers/automations/change_secret.py:110
#: accounts/serializers/automations/change_secret.py:141
#: accounts/templates/accounts/change_secret_failed_info.html:12
#: acls/serializers/base.py:124 acls/templates/acls/asset_login_reminder.html:7
#: acls/serializers/base.py:124 acls/templates/acls/asset_login_reminder.html:9
#: assets/serializers/gateway.py:28 audits/models.py:59
#: authentication/api/connection_token.py:411 ops/models/base.py:18
#: perms/models/asset_permission.py:75 terminal/backends/command/models.py:18
@ -848,7 +848,7 @@ msgstr "編集済み"
#: accounts/serializers/account/account.py:273
#: accounts/serializers/automations/base.py:22 acls/models/base.py:97
#: acls/templates/acls/asset_login_reminder.html:6
#: acls/templates/acls/asset_login_reminder.html:8
#: assets/models/automations/base.py:19
#: assets/serializers/automations/base.py:20
#: authentication/api/connection_token.py:410 ops/models/base.py:17
@ -881,8 +881,8 @@ msgid "ID"
msgstr "ID"
#: accounts/serializers/account/account.py:453 acls/serializers/base.py:116
#: acls/templates/acls/asset_login_reminder.html:5
#: acls/templates/acls/user_login_reminder.html:5
#: acls/templates/acls/asset_login_reminder.html:7
#: acls/templates/acls/user_login_reminder.html:8
#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:54
#: audits/models.py:90 audits/models.py:172 audits/models.py:269
#: audits/serializers.py:171 authentication/models/connection_token.py:32
@ -1126,8 +1126,6 @@ msgid "Task execution id"
msgstr "タスク実行ID"
#: accounts/templates/accounts/change_secret_failed_info.html:5
#: acls/templates/acls/asset_login_reminder.html:3
#: acls/templates/acls/user_login_reminder.html:3
msgid "Respectful"
msgstr "尊敬する"
@ -1302,7 +1300,7 @@ msgid "User login reminder"
msgstr "ユーザーログインのリマインダ"
#: acls/notifications.py:42
msgid "Asset login reminder"
msgid "User login alert for asset"
msgstr "資産ログインのリマインダ"
#: acls/serializers/base.py:11 acls/serializers/login_acl.py:11
@ -1360,42 +1358,57 @@ msgstr "IP"
msgid "Time Period"
msgstr "期間"
#: acls/templates/acls/asset_login_reminder.html:10
#: acls/templates/acls/asset_login_reminder.html:3
#: acls/templates/acls/user_login_reminder.html:3
msgid "Dear"
msgstr "尊敬する"
#: acls/templates/acls/asset_login_reminder.html:5
msgid ""
"The user has just logged in to the asset. Please ensure that this is an "
"authorized operation. If you suspect that this is an unauthorized access, "
"please take appropriate measures immediately."
msgstr ""
"ユーザーは資産にログインしています。許可されたアクションであることを確認して"
"ください。不正アクセスが疑われる場合は、すぐに適切な措置を取ってください。"
"We would like to inform you that a user has recently logged into the "
"following asset:"
msgstr "以下の資産にユーザーが最近ログインしたことをお知らせいたします。"
#: acls/templates/acls/asset_login_reminder.html:6
msgid "Asset details"
msgstr "資産詳細"
#: acls/templates/acls/asset_login_reminder.html:12
#: acls/templates/acls/user_login_reminder.html:13
msgid "Thank you"
msgstr "ありがとうございます。"
#: acls/templates/acls/user_login_reminder.html:15
msgid ""
"Please review the login activity to ensure the security and proper usage of "
"the asset. If you did not authorize this login or if you notice any "
"suspicious activity, please take the necessary actions immediately."
msgstr ""
"資産のセキュリティと適切な使用を確保するために、ログイン活動を確認してくださ"
"い。このログインを承認していない場合や、不審な活動に気付いた場合は、直ちに必"
"要な措置を講じてください。"
#: acls/templates/acls/user_login_reminder.html:7 audits/models.py:194
#: acls/templates/acls/asset_login_reminder.html:14
#: acls/templates/acls/user_login_reminder.html:16
msgid "Thank you for your attention to this matter"
msgstr "この件についてのご注意をお願いいたします。"
#: acls/templates/acls/user_login_reminder.html:5
msgid "We would like to inform you that a user has recently logged:"
msgstr "ユーザーが最近ログインしたことをお知らせいたします:"
#: acls/templates/acls/user_login_reminder.html:6
msgid "User details"
msgstr "ユーザー詳細"
#: acls/templates/acls/user_login_reminder.html:10 audits/models.py:194
#: audits/models.py:263
#: authentication/templates/authentication/_msg_different_city.html:11
#: tickets/models/ticket/login_confirm.py:11
msgid "Login city"
msgstr "ログイン都市"
#: acls/templates/acls/user_login_reminder.html:8 audits/models.py:197
#: acls/templates/acls/user_login_reminder.html:11 audits/models.py:197
#: audits/models.py:264 audits/serializers.py:68
msgid "User agent"
msgstr "ユーザーエージェント"
#: acls/templates/acls/user_login_reminder.html:11
msgid ""
"The user has just successfully logged into the system. Please ensure that "
"this is an authorized operation. If you suspect that this is an unauthorized "
"access, please take appropriate measures immediately."
msgstr ""
"ユーザーはシステムに正常にログインしたばかりです。許可されたアクションである"
"ことを確認してください。不正アクセスが疑われる場合は、すぐに適切な措置を取っ"
"てください。"
#: assets/api/asset/asset.py:180
msgid "Cannot create asset directly, you should create a host or other"
msgstr ""
@ -4546,13 +4559,13 @@ msgid "Server performance"
msgstr "サーバーのパフォーマンス"
#: ops/notifications.py:25
msgid "Terminal health check warning"
msgstr "ターミナルヘルスチェックの警告"
msgid "Component health check warning"
msgstr "コンポーネントのヘルスチェック警告"
#: ops/notifications.py:70
#, python-brace-format
msgid "The terminal is offline: {name}"
msgstr "ターミナルはオフラインです: {name}"
msgid "The component is offline: {name}"
msgstr "コンポーネントがオフラインです: {name}"
#: ops/notifications.py:75
#, python-brace-format
@ -4860,7 +4873,7 @@ msgid "day"
msgstr "日"
#: perms/notifications.py:15
msgid "You permed assets is about to expire"
msgid "The asset you authorized is about to expire"
msgstr "パーマ資産の有効期限が近づいています"
#: perms/notifications.py:20
@ -6029,10 +6042,6 @@ msgstr "コマンドフィルタリング"
msgid "Virtual app"
msgstr "仮想アプリケーション"
#: settings/serializers/feature.py:148
msgid "vApp"
msgstr ""
#: settings/serializers/feature.py:150
msgid ""
"Virtual applications, you can use the Linux operating system as an "
@ -6499,7 +6508,7 @@ msgid "Registration periodic import ldap user task"
msgstr "登録サイクルLDAPユーザータスクのインポート"
#: settings/templates/ldap/_msg_import_ldap_user.html:2
msgid "Sync task Finish"
msgid "Sync task finish"
msgstr "同期タスクが完了しました"
#: settings/templates/ldap/_msg_import_ldap_user.html:6

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-27 16:41+0800\n"
"POT-Creation-Date: 2024-05-22 18:27+0800\n"
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n"
@ -317,7 +317,7 @@ msgstr "来源 ID"
#: accounts/serializers/automations/change_secret.py:110
#: accounts/serializers/automations/change_secret.py:141
#: accounts/templates/accounts/change_secret_failed_info.html:12
#: acls/serializers/base.py:124 acls/templates/acls/asset_login_reminder.html:7
#: acls/serializers/base.py:124 acls/templates/acls/asset_login_reminder.html:9
#: assets/serializers/gateway.py:28 audits/models.py:59
#: authentication/api/connection_token.py:411 ops/models/base.py:18
#: perms/models/asset_permission.py:75 terminal/backends/command/models.py:18
@ -844,7 +844,7 @@ msgstr "已修改"
#: accounts/serializers/account/account.py:273
#: accounts/serializers/automations/base.py:22 acls/models/base.py:97
#: acls/templates/acls/asset_login_reminder.html:6
#: acls/templates/acls/asset_login_reminder.html:8
#: assets/models/automations/base.py:19
#: assets/serializers/automations/base.py:20
#: authentication/api/connection_token.py:410 ops/models/base.py:17
@ -877,8 +877,8 @@ msgid "ID"
msgstr "ID"
#: accounts/serializers/account/account.py:453 acls/serializers/base.py:116
#: acls/templates/acls/asset_login_reminder.html:5
#: acls/templates/acls/user_login_reminder.html:5
#: acls/templates/acls/asset_login_reminder.html:7
#: acls/templates/acls/user_login_reminder.html:8
#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:54
#: audits/models.py:90 audits/models.py:172 audits/models.py:269
#: audits/serializers.py:171 authentication/models/connection_token.py:32
@ -1117,8 +1117,6 @@ msgid "Task execution id"
msgstr "任务执行 ID"
#: accounts/templates/accounts/change_secret_failed_info.html:5
#: acls/templates/acls/asset_login_reminder.html:3
#: acls/templates/acls/user_login_reminder.html:3
msgid "Respectful"
msgstr "尊敬的"
@ -1288,7 +1286,7 @@ msgid "User login reminder"
msgstr "用户登录提醒"
#: acls/notifications.py:42
msgid "Asset login reminder"
msgid "User login alert for asset"
msgstr "资产登录提醒"
#: acls/serializers/base.py:11 acls/serializers/login_acl.py:11
@ -1345,41 +1343,56 @@ msgstr "IP"
msgid "Time Period"
msgstr "时段"
#: acls/templates/acls/asset_login_reminder.html:10
#: acls/templates/acls/asset_login_reminder.html:3
#: acls/templates/acls/user_login_reminder.html:3
msgid "Dear"
msgstr "尊敬的"
#: acls/templates/acls/asset_login_reminder.html:5
msgid ""
"The user has just logged in to the asset. Please ensure that this is an "
"authorized operation. If you suspect that this is an unauthorized access, "
"please take appropriate measures immediately."
msgstr ""
"用户刚刚在登录资产。请确保这是授权的操作。如果您怀疑这是一个未经授权的访问,"
"请立即采取适当的措施。"
"We would like to inform you that a user has recently logged into the "
"following asset:"
msgstr "我们想通知您,以下资产最近有用户登录:"
#: acls/templates/acls/asset_login_reminder.html:6
msgid "Asset details"
msgstr "资产详情"
#: acls/templates/acls/asset_login_reminder.html:12
#: acls/templates/acls/user_login_reminder.html:13
msgid "Thank you"
msgstr "谢谢"
#: acls/templates/acls/user_login_reminder.html:15
msgid ""
"Please review the login activity to ensure the security and proper usage of "
"the asset. If you did not authorize this login or if you notice any "
"suspicious activity, please take the necessary actions immediately."
msgstr ""
"请您审核此登录活动,以确保资产的安全和正确使用。如果您未授权此次登录或发现任"
"何可疑活动,请立即采取必要的措施。"
#: acls/templates/acls/user_login_reminder.html:7 audits/models.py:194
#: acls/templates/acls/asset_login_reminder.html:14
#: acls/templates/acls/user_login_reminder.html:16
msgid "Thank you for your attention to this matter"
msgstr "感谢您对此事的关注。"
#: acls/templates/acls/user_login_reminder.html:5
msgid "We would like to inform you that a user has recently logged:"
msgstr "我们想通知您,最近有用户登录:"
#: acls/templates/acls/user_login_reminder.html:6
msgid "User details"
msgstr "用户详情"
#: acls/templates/acls/user_login_reminder.html:10 audits/models.py:194
#: audits/models.py:263
#: authentication/templates/authentication/_msg_different_city.html:11
#: tickets/models/ticket/login_confirm.py:11
msgid "Login city"
msgstr "登录城市"
#: acls/templates/acls/user_login_reminder.html:8 audits/models.py:197
#: acls/templates/acls/user_login_reminder.html:11 audits/models.py:197
#: audits/models.py:264 audits/serializers.py:68
msgid "User agent"
msgstr "用户代理"
#: acls/templates/acls/user_login_reminder.html:11
msgid ""
"The user has just successfully logged into the system. Please ensure that "
"this is an authorized operation. If you suspect that this is an unauthorized "
"access, please take appropriate measures immediately."
msgstr ""
"用户刚刚成功登录到系统。请确保这是授权的操作。如果您怀疑这是一个未经授权的访"
"问,请立即采取适当的措施。"
#: assets/api/asset/asset.py:180
msgid "Cannot create asset directly, you should create a host or other"
msgstr "不能直接创建资产, 你应该创建主机或其他资产"
@ -4461,13 +4474,13 @@ msgid "Server performance"
msgstr "监控告警"
#: ops/notifications.py:25
msgid "Terminal health check warning"
msgstr "终端健康状况检查警告"
msgid "Component health check warning"
msgstr "组件健康状况检查警告"
#: ops/notifications.py:70
#, python-brace-format
msgid "The terminal is offline: {name}"
msgstr "终端已离线: {name}"
msgid "The component is offline: {name}"
msgstr "组件已离线: {name}"
#: ops/notifications.py:75
#, python-brace-format
@ -4756,7 +4769,7 @@ msgid "day"
msgstr "天"
#: perms/notifications.py:15
msgid "You permed assets is about to expire"
msgid "The asset you authorized is about to expire"
msgstr "你授权的资产即将到期"
#: perms/notifications.py:20
@ -5895,10 +5908,6 @@ msgstr "作业中心命令黑名单"
msgid "Virtual app"
msgstr "虚拟应用"
#: settings/serializers/feature.py:148
msgid "vApp"
msgstr ""
#: settings/serializers/feature.py:150
msgid ""
"Virtual applications, you can use the Linux operating system as an "
@ -6339,7 +6348,7 @@ msgid "Registration periodic import ldap user task"
msgstr "注册周期导入 LDAP 用户 任务"
#: settings/templates/ldap/_msg_import_ldap_user.html:2
msgid "Sync task Finish"
msgid "Sync task finish"
msgstr "同步任务完成"
#: settings/templates/ldap/_msg_import_ldap_user.html:6

View File

@ -80,7 +80,7 @@
"All": "All",
"AllAccountTip": "All accounts already added on the asset",
"AllAccounts": "All",
"AllClickRead": "All marked as read",
"AllClickRead": "Mark all as read",
"AllMembers": "All members",
"AllowInvalidCert": "Ignore certificate check",
"Announcement": "Announcement",
@ -406,7 +406,7 @@
"DisplayName": "Name",
"Docs": "Document",
"Download": "Download",
"DownloadCenter": "Download center",
"DownloadCenter": "Download",
"DownloadFTPFileTip": "The current action does not record files, or the file size exceeds the threshold (default 100m), or it has not yet been saved to the corresponding storage",
"DownloadImportTemplateMsg": "Download creation template",
"DownloadReplay": "Download recording",
@ -722,7 +722,7 @@
"NoPermission": "No permissions",
"NoPermission403": "403 no permission",
"NoPermissionVew": "No permission to view the current page",
"NoUnreadMsg": "No unread messages",
"NoUnreadMsg": "You have unread notifications",
"Node": "Node",
"NodeAmount": "Nodes",
"NodeInformation": "Node information",
@ -749,7 +749,7 @@
"OldPublicKey": "Old Public Key",
"OneAssignee": "First-level approver",
"OneAssigneeType": "First-level handler type",
"OneClickReadMsg": "Are you sure you want to mark the current information as read?",
"OneClickReadMsg": "Are you sure you want to mark all as read?",
"OnlineSession": "Online devices",
"OnlineSessionHelpMsg": "Unable to log out of the current session because it is the current user's online session. currently only users logged in via web are being logged.",
"OnlineSessions": "Online sessions",

View File

@ -752,7 +752,7 @@
"OldPublicKey": "旧 SSH 公開鍵",
"OneAssignee": "一次審査員",
"OneAssigneeType": "一次受理者タイプ",
"OneClickReadMsg": "現在の情報をすべて既読にしますか?",
"OneClickReadMsg": "すべてを既読にしますか?",
"OnlineSession": "オンラインユーザー",
"OnlineSessionHelpMsg": "現在のセッションをオフラインにすることはできません。そのため、現在のユーザーがオンラインセッションです。現在、Webでログインするユーザーだけが記録されます。",
"OnlineSessions": "オンラインセッション数",

View File

@ -739,7 +739,7 @@
"NewPublicKey": "新 SSH 公钥",
"OneAssignee": "一级受理人",
"OneAssigneeType": "一级受理人类型",
"OneClickReadMsg": "你确定要将当前信息标记为已读吗?",
"OneClickReadMsg": "你确定全部标记为已读吗?",
"OnlineSession": "在线用户",
"OnlineSessionHelpMsg": "无法下线当前会话,因为该会话是当前用户的在线会话。当前只记录以 Web 方式登录的用户。",
"OnlineSessions": "在线会话数",

View File

@ -864,7 +864,7 @@
"OneAssignee": "一級受理人",
"OneAssigneeType": "一級受理人類型",
"OneClickRead": "當前已讀",
"OneClickReadMsg": "你確定要將當前資訊標記為已讀嗎?",
"OneClickReadMsg": "你確定要全部標記為已讀嗎?",
"OnlineSession": "在線用戶",
"OnlineSessionHelpMsg": "無法下線當前會話,因為該會話是當前用戶的在線會話。當前只記錄以 Web 方式登入的用戶。",
"OnlineSessions": "在線會話數",

View File

@ -543,7 +543,7 @@ class Config(dict):
'PERM_EXPIRED_CHECK_PERIODIC': 60 * 60,
'PERM_TREE_REGEN_INTERVAL': 1,
'FLOWER_URL': "127.0.0.1:5555",
'LANGUAGE_CODE': 'zh',
'LANGUAGE_CODE': 'en',
'TIME_ZONE': 'Asia/Shanghai',
'FORCE_SCRIPT_NAME': '',
'SESSION_COOKIE_SECURE': False,
@ -624,6 +624,7 @@ class Config(dict):
'LOKI_LOG_ENABLED': False,
'LOKI_BASE_URL': 'http://loki:3100',
'TOOL_USER_ENABLED': False,
}
old_config_map = {

View File

@ -238,3 +238,5 @@ ANSIBLE_RECEPTOR_TCP_LISTEN_ADDRESS = CONFIG.ANSIBLE_RECEPTOR_TCP_LISTEN_ADDRESS
LOKI_LOG_ENABLED = CONFIG.LOKI_LOG_ENABLED
LOKI_BASE_URL = CONFIG.LOKI_BASE_URL
TOOL_USER_ENABLED = CONFIG.TOOL_USER_ENABLED

View File

@ -22,7 +22,7 @@ class ServerPerformanceMessage(SystemMessage):
self.terms_with_errors = terms_with_errors
def get_html_msg(self) -> dict:
subject = gettext("Terminal health check warning")
subject = gettext("Component health check warning")
context = {
'terms_with_errors': self.terms_with_errors
}
@ -55,7 +55,7 @@ class ServerPerformanceMessage(SystemMessage):
for item, data in items_mapper.items():
msg = data['alarm_msg_format']
max_threshold = data['max_threshold']
value = 123 // i+1
value = 123 // i + 1
msg = msg.format(max_threshold=max_threshold, value=value, name=term.name)
errors.append(msg)
terms_with_errors.append([term, errors])
@ -67,7 +67,7 @@ class ServerPerformanceCheckUtil(object):
'is_alive': {
'default': False,
'max_threshold': False,
'alarm_msg_format': _('The terminal is offline: {name}')
'alarm_msg_format': _('The component is offline: {name}')
},
'disk_used': {
'default': 0,

View File

@ -12,7 +12,7 @@ class PermedAssetsWillExpireUserMsg(UserMessage):
self.day_count = _('today') if day_count == 0 else str(day_count) + _('day')
def get_html_msg(self) -> dict:
subject = _("You permed assets is about to expire")
subject = _("The asset you authorized is about to expire")
context = {
'name': self.user.name,
'count': self.day_count,

View File

@ -1,6 +1,6 @@
{% load i18n %}
<p>
{% trans 'Hello' %} {{ name }},
{% trans 'Dear' %} {{ name }},
</p>
<p>

View File

@ -63,6 +63,7 @@ class SettingsApi(generics.RetrieveUpdateAPIView):
'ticket': serializers.TicketSettingSerializer,
'ops': serializers.OpsSettingSerializer,
'virtualapp': serializers.VirtualAppSerializer,
'tool': serializers.ToolSerializer,
}
rbac_category_permissions = {

View File

@ -13,3 +13,4 @@ from .public import *
from .security import *
from .settings import *
from .terminal import *
from .tool import *

View File

@ -145,7 +145,7 @@ class VirtualAppSerializer(serializers.Serializer):
PREFIX_TITLE = _('Virtual app')
VIRTUAL_APP_ENABLED = serializers.BooleanField(
required=False, label=_('vApp'),
required=False, label=_('Virtual App'),
help_text=_(
'Virtual applications, you can use the Linux operating system as an application server '
'in remote applications.'

View File

@ -63,6 +63,7 @@ class PrivateSettingSerializer(PublicSettingSerializer):
GPT_MODEL = serializers.CharField()
FILE_UPLOAD_SIZE_LIMIT_MB = serializers.IntegerField()
LOKI_LOG_ENABLED = serializers.BooleanField()
TOOL_USER_ENABLED = serializers.BooleanField()
class ServerInfoSerializer(serializers.Serializer):

View File

@ -0,0 +1,18 @@
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
__all__ = [
'ToolSerializer'
]
class ToolSerializer(serializers.Serializer):
PREFIX_TITLE = _('Tool')
TOOL_USER_ENABLED = serializers.BooleanField(
label=_('Tools in the Workbench'), default=True,
help_text=_(
"*! If enabled, users with RBAC permissions will be able to utilize all "
"tools in the workbench"
)
)

View File

@ -1,5 +1,5 @@
{% load i18n %}
<p>{% trans "Sync task Finish" %}</p>
<p>{% trans "Sync task finish" %}</p>
<b>{% trans 'Time' %}:</b>
<ul>
<li>{% trans 'Date start' %}: {{ start_time }}</li>

View File

@ -176,7 +176,7 @@ class Applet(JMSBaseModel):
label_value = spec_label.label.value
matched = [host for host in hosts if host.name == label_value]
if matched:
return matched[0]
return random.choice(matched)
hosts = [h for h in hosts if h.auto_create_accounts]
prefer_key = self.host_prefer_key_tpl.format(user.id)

View File

@ -8,7 +8,7 @@ from ...models import Preference
class BasicSerializer(serializers.Serializer):
has_secret_key = serializers.SerializerMethodField(
help_text=_(
'The password for file encryption, '
'*! The password for file encryption, '
'used for decryption when the system sends emails containing file attachments. '
'<br>'
'Such as: account backup files, account password change results files'
@ -43,4 +43,4 @@ class BasicSerializer(serializers.Serializer):
class LinaSerializer(serializers.Serializer):
basic = BasicSerializer(required=False, label=_('Basic'))
basic = BasicSerializer(required=False, label=_('File Encryption'))

View File

@ -1,10 +1,10 @@
{% load i18n %}
<p>
{% trans 'Hello' %} {{ name }},
{% trans 'Dear' %} {{ name }},
</p>
<p>
{% trans 'Your MFA has been reset by site administrator' %} <br />
{% trans 'Your MFA has been reset by site administrator' %} <br/>
{% trans 'Please click the link below to set' %}
<br>
<br>