From 6a73cd6b77c8d45b4ac686ec3240ce893f3ec3ba Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 9 Jun 2023 15:40:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?perf:=20=E6=B7=BB=E5=8A=A0=20edition=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/locale/ja/LC_MESSAGES/django.mo | 4 +- apps/locale/ja/LC_MESSAGES/django.po | 419 ++++++++++-------- apps/locale/zh/LC_MESSAGES/django.mo | 4 +- apps/locale/zh/LC_MESSAGES/django.po | 413 +++++++++-------- .../migrations/0062_applet_edition.py | 18 + apps/terminal/models/applet/applet.py | 6 + apps/terminal/serializers/applet.py | 5 +- 7 files changed, 497 insertions(+), 372 deletions(-) create mode 100644 apps/terminal/migrations/0062_applet_edition.py diff --git a/apps/locale/ja/LC_MESSAGES/django.mo b/apps/locale/ja/LC_MESSAGES/django.mo index 7e5717517..30c105fcf 100644 --- a/apps/locale/ja/LC_MESSAGES/django.mo +++ b/apps/locale/ja/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a93b6a850b251ea2ee17b6b9dbdee93130f745ce8278faaecbf60d74f934f1b5 -size 143780 +oid sha256:7db1805061d28a0ba931846140e9f106b71ed5ebeb414f741b68d6c3d93130be +size 142961 diff --git a/apps/locale/ja/LC_MESSAGES/django.po b/apps/locale/ja/LC_MESSAGES/django.po index 1e83ad711..9688219e7 100644 --- a/apps/locale/ja/LC_MESSAGES/django.po +++ b/apps/locale/ja/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-31 18:12+0800\n" +"POT-Creation-Date: 2023-06-09 10:59+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -71,7 +71,7 @@ msgid "Collected" msgstr "集めました" #: accounts/const/account.py:21 accounts/serializers/account/account.py:26 -#: settings/serializers/auth/sms.py:76 +#: settings/serializers/auth/sms.py:75 msgid "Template" msgstr "テンプレート" @@ -79,13 +79,13 @@ msgstr "テンプレート" msgid "Skip" msgstr "スキップ" -#: accounts/const/account.py:26 audits/const.py:23 rbac/tree.py:229 +#: accounts/const/account.py:26 audits/const.py:24 rbac/tree.py:229 #: templates/_csv_import_export.html:18 templates/_csv_update_modal.html:6 msgid "Update" msgstr "更新" #: accounts/const/account.py:27 -#: accounts/serializers/automations/change_secret.py:156 audits/const.py:53 +#: accounts/serializers/automations/change_secret.py:156 audits/const.py:54 #: audits/signal_handlers/activity_log.py:33 common/const/choices.py:19 #: ops/const.py:58 terminal/const.py:61 xpack/plugins/cloud/const.py:41 msgid "Failed" @@ -186,10 +186,10 @@ msgstr "作成のみ" #: accounts/serializers/account/gathered_account.py:10 #: accounts/serializers/automations/change_secret.py:112 #: accounts/serializers/automations/change_secret.py:132 -#: acls/serializers/base.py:76 assets/models/asset/common.py:93 +#: acls/serializers/base.py:118 assets/models/asset/common.py:93 #: assets/models/asset/common.py:332 assets/models/cmd_filter.py:36 #: assets/serializers/domain.py:19 assets/serializers/label.py:27 -#: audits/models.py:48 authentication/models/connection_token.py:34 +#: audits/models.py:53 authentication/models/connection_token.py:34 #: perms/models/asset_permission.py:64 perms/serializers/permission.py:34 #: terminal/backends/command/models.py:20 terminal/models/session/session.py:32 #: terminal/notifications.py:95 terminal/serializers/command.py:17 @@ -206,7 +206,7 @@ msgid "Su from" msgstr "から切り替え" #: accounts/models/account.py:55 settings/serializers/auth/cas.py:20 -#: settings/serializers/auth/feishu.py:20 terminal/models/applet/applet.py:30 +#: settings/serializers/auth/feishu.py:20 terminal/models/applet/applet.py:34 msgid "Version" msgstr "バージョン" @@ -222,8 +222,8 @@ msgstr "ソース ID" #: accounts/models/account.py:61 #: accounts/serializers/automations/change_secret.py:113 #: accounts/serializers/automations/change_secret.py:133 -#: acls/serializers/base.py:77 assets/serializers/asset/common.py:125 -#: assets/serializers/gateway.py:28 audits/models.py:49 ops/models/base.py:18 +#: acls/serializers/base.py:119 assets/serializers/asset/common.py:125 +#: assets/serializers/gateway.py:28 audits/models.py:54 ops/models/base.py:18 #: perms/models/asset_permission.py:70 perms/serializers/permission.py:39 #: terminal/backends/command/models.py:21 terminal/models/session/session.py:34 #: tickets/models/ticket/command_confirm.py:13 xpack/plugins/cloud/models.py:85 @@ -275,7 +275,7 @@ msgid "Account backup plan" msgstr "アカウントバックアップ計画" #: accounts/models/automations/backup_account.py:83 -#: assets/models/automations/base.py:115 audits/models.py:55 +#: assets/models/automations/base.py:115 audits/models.py:60 #: ops/models/base.py:55 ops/models/celery.py:63 ops/models/job.py:192 #: ops/templates/ops/celery_task_log.html:75 #: perms/models/asset_permission.py:72 terminal/models/applet/host.py:137 @@ -303,7 +303,7 @@ msgstr "アカウントのバックアップスナップショット" msgid "Trigger mode" msgstr "トリガーモード" -#: accounts/models/automations/backup_account.py:97 audits/models.py:172 +#: accounts/models/automations/backup_account.py:97 audits/models.py:194 #: terminal/models/session/sharing.py:111 xpack/plugins/cloud/models.py:168 msgid "Reason" msgstr "理由" @@ -426,8 +426,8 @@ msgstr "最終ログイン日" #: accounts/models/automations/gather_account.py:17 #: accounts/models/automations/push_account.py:15 accounts/models/base.py:34 -#: acls/serializers/base.py:19 acls/serializers/base.py:50 -#: assets/models/_user.py:23 audits/models.py:157 authentication/forms.py:25 +#: acls/serializers/base.py:18 acls/serializers/base.py:49 +#: assets/models/_user.py:23 audits/models.py:179 authentication/forms.py:25 #: authentication/forms.py:27 authentication/models/temp_token.py:9 #: authentication/templates/authentication/_msg_different_city.html:9 #: authentication/templates/authentication/_msg_oauth_bind.html:9 @@ -459,8 +459,8 @@ msgid "Triggers" msgstr "トリガー方式" #: accounts/models/automations/push_account.py:16 acls/models/base.py:43 -#: acls/serializers/base.py:57 assets/models/cmd_filter.py:81 -#: audits/models.py:65 audits/serializers.py:82 +#: acls/serializers/base.py:56 assets/models/cmd_filter.py:81 +#: audits/models.py:87 audits/serializers.py:82 #: authentication/serializers/connect_token_secret.py:116 #: authentication/templates/authentication/_access_key_modal.html:34 msgid "Action" @@ -474,8 +474,8 @@ msgstr "アカウントプッシュ" msgid "Verify asset account" msgstr "アカウントの確認" -#: accounts/models/base.py:33 acls/models/base.py:37 -#: acls/models/command_acl.py:21 acls/serializers/base.py:35 +#: accounts/models/base.py:33 acls/models/base.py:37 acls/models/base.py:97 +#: acls/models/command_acl.py:21 acls/serializers/base.py:34 #: applications/models.py:9 assets/models/_user.py:22 #: assets/models/asset/common.py:91 assets/models/asset/common.py:149 #: assets/models/cmd_filter.py:21 assets/models/domain.py:18 @@ -488,7 +488,7 @@ msgstr "アカウントの確認" #: ops/models/job.py:92 ops/models/playbook.py:23 ops/serializers/job.py:20 #: orgs/models.py:69 perms/models/asset_permission.py:56 rbac/models/role.py:29 #: settings/models.py:33 settings/serializers/sms.py:6 -#: terminal/models/applet/applet.py:28 terminal/models/component/endpoint.py:12 +#: terminal/models/applet/applet.py:32 terminal/models/component/endpoint.py:12 #: terminal/models/component/endpoint.py:90 #: terminal/models/component/storage.py:26 terminal/models/component/task.py:15 #: terminal/models/component/terminal.py:84 users/forms/profile.py:33 @@ -505,7 +505,7 @@ msgstr "特権アカウント" #: assets/models/automations/base.py:21 assets/models/cmd_filter.py:39 #: assets/models/label.py:22 #: authentication/serializers/connect_token_secret.py:114 -#: terminal/models/applet/applet.py:33 users/serializers/user.py:170 +#: terminal/models/applet/applet.py:38 users/serializers/user.py:170 msgid "Is active" msgstr "アクティブです。" @@ -575,7 +575,7 @@ msgstr "カテゴリ" #: assets/serializers/asset/common.py:122 assets/serializers/platform.py:94 #: assets/serializers/platform.py:109 audits/serializers.py:48 #: authentication/serializers/connect_token_secret.py:123 ops/models/job.py:103 -#: perms/serializers/user_permission.py:27 terminal/models/applet/applet.py:32 +#: perms/serializers/user_permission.py:27 terminal/models/applet/applet.py:37 #: terminal/models/component/storage.py:57 #: terminal/models/component/storage.py:146 terminal/serializers/applet.py:29 #: terminal/serializers/session.py:22 terminal/serializers/storage.py:224 @@ -607,7 +607,7 @@ msgid "Changed" msgstr "編集済み" #: accounts/serializers/account/account.py:249 -#: accounts/serializers/automations/base.py:22 acls/models/base.py:84 +#: accounts/serializers/automations/base.py:22 acls/models/base.py:98 #: assets/models/automations/base.py:19 #: assets/serializers/automations/base.py:20 ops/models/base.py:17 #: ops/models/job.py:105 ops/serializers/job.py:21 @@ -629,16 +629,15 @@ msgid "Account has exist" msgstr "アカウントはすでに存在しています" #: accounts/serializers/account/account.py:417 -#: authentication/serializers/connect_token_secret.py:154 +#: authentication/serializers/connect_token_secret.py:156 #: authentication/templates/authentication/_access_key_modal.html:30 #: perms/models/perm_node.py:21 users/serializers/group.py:33 msgid "ID" msgstr "ID" -#: accounts/serializers/account/account.py:424 acls/models/login_acl.py:12 -#: acls/serializers/base.py:75 acls/serializers/login_acl.py:21 -#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:44 -#: audits/models.py:63 audits/models.py:141 +#: accounts/serializers/account/account.py:424 acls/serializers/base.py:111 +#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:49 +#: audits/models.py:85 audits/models.py:163 #: authentication/models/connection_token.py:30 #: authentication/models/sso_token.py:16 #: notifications/models/notification.py:12 @@ -727,8 +726,8 @@ msgstr "* パスワードの長さの範囲6-30ビット" msgid "Automation task execution" msgstr "自動タスク実行履歴" -#: accounts/serializers/automations/change_secret.py:155 audits/const.py:52 -#: audits/models.py:54 audits/signal_handlers/activity_log.py:33 +#: accounts/serializers/automations/change_secret.py:155 audits/const.py:53 +#: audits/models.py:59 audits/signal_handlers/activity_log.py:33 #: common/const/choices.py:18 ops/const.py:56 ops/serializers/celery.py:40 #: terminal/const.py:60 terminal/models/session/sharing.py:107 #: tickets/views/approve.py:114 @@ -802,14 +801,13 @@ msgstr "優先順位" msgid "1-100, the lower the value will be match first" msgstr "1-100、低い値は最初に一致します" -#: acls/models/base.py:44 acls/serializers/base.py:79 -#: acls/serializers/login_acl.py:23 assets/models/cmd_filter.py:86 +#: acls/models/base.py:44 assets/models/cmd_filter.py:86 #: authentication/serializers/connect_token_secret.py:88 msgid "Reviewers" msgstr "レビュー担当者" #: acls/models/base.py:45 authentication/models/access_key.py:17 -#: authentication/models/connection_token.py:50 +#: authentication/models/connection_token.py:51 #: authentication/templates/authentication/_access_key_modal.html:32 #: perms/models/asset_permission.py:76 terminal/models/session/sharing.py:27 #: tickets/const.py:37 @@ -820,7 +818,7 @@ msgstr "アクティブ" msgid "Users" msgstr "ユーザー" -#: acls/models/base.py:85 assets/models/automations/base.py:17 +#: acls/models/base.py:99 assets/models/automations/base.py:17 #: assets/models/cmd_filter.py:38 assets/serializers/asset/common.py:305 #: rbac/tree.py:35 msgid "Accounts" @@ -839,7 +837,7 @@ msgid "Regex" msgstr "正規情報" #: acls/models/command_acl.py:26 assets/models/cmd_filter.py:79 -#: settings/serializers/basic.py:10 xpack/plugins/license/models.py:30 +#: settings/serializers/basic.py:10 xpack/plugins/license/models.py:29 msgid "Content" msgstr "コンテンツ" @@ -869,16 +867,22 @@ msgstr "コマンドフィルタリング" msgid "Command confirm" msgstr "コマンドの確認" -#: acls/models/login_acl.py:15 acls/models/login_asset_acl.py:9 -#: acls/serializers/login_acl.py:28 acls/serializers/login_asset_acl.py:13 +#: acls/models/connect_method.py:10 +#, fuzzy +#| msgid "Connect method" +msgid "Connect methods" +msgstr "接続方法" + +#: acls/models/login_acl.py:11 acls/models/login_asset_acl.py:9 +#: acls/serializers/login_acl.py:15 acls/serializers/login_asset_acl.py:13 msgid "Rule" msgstr "ルール" -#: acls/models/login_acl.py:18 +#: acls/models/login_acl.py:14 msgid "Login acl" msgstr "ログインacl" -#: acls/models/login_acl.py:39 tickets/const.py:10 +#: acls/models/login_acl.py:27 tickets/const.py:10 msgid "Login confirm" msgstr "ログイン確認" @@ -890,11 +894,11 @@ msgstr "ログインasset acl" msgid "Login asset confirm" msgstr "ログイン資産の確認" -#: acls/serializers/base.py:11 acls/serializers/login_acl.py:16 +#: acls/serializers/base.py:10 acls/serializers/login_acl.py:11 msgid "With * indicating a match all. " msgstr "* はすべて一致することを示します。" -#: acls/serializers/base.py:26 +#: acls/serializers/base.py:25 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 (Domain name " @@ -904,19 +908,15 @@ msgstr "" "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 +#: acls/serializers/base.py:40 assets/serializers/asset/host.py:19 msgid "IP/Host" msgstr "IP/ホスト" -#: acls/serializers/base.py:82 acls/serializers/login_acl.py:26 -msgid "Reviewers amount" -msgstr "承認者数" - -#: acls/serializers/base.py:108 tickets/serializers/ticket/ticket.py:77 +#: acls/serializers/base.py:98 tickets/serializers/ticket/ticket.py:77 msgid "The organization `{}` does not exist" msgstr "組織 '{}'は存在しません" -#: acls/serializers/base.py:114 +#: acls/serializers/base.py:104 msgid "None of the reviewers belong to Organization `{}`" msgstr "いずれのレビューアも組織 '{}' に属していません" @@ -988,6 +988,10 @@ msgstr "ルートノード ({}) を削除できません。" msgid "Deletion failed and the node contains assets" msgstr "削除に失敗し、ノードにアセットが含まれています。" +#: assets/api/tree.py:49 assets/serializers/node.py:41 +msgid "The same level node name cannot be the same" +msgstr "同じレベルのノード名を同じにすることはできません。" + #: assets/apps.py:9 msgid "App assets" msgstr "アプリ資産" @@ -997,7 +1001,7 @@ msgid "{} disabled" msgstr "{} 無効" #: assets/automations/ping_gateway/manager.py:33 -#: authentication/models/connection_token.py:115 +#: authentication/models/connection_token.py:116 msgid "No account" msgstr "アカウントなし" @@ -1020,7 +1024,7 @@ msgstr "認証に失敗しました" msgid "Connect failed" msgstr "接続に失敗しました" -#: assets/const/automation.py:6 audits/const.py:6 audits/const.py:35 +#: assets/const/automation.py:6 audits/const.py:6 audits/const.py:36 #: audits/signal_handlers/activity_log.py:62 common/utils/ip/geoip/utils.py:31 #: common/utils/ip/geoip/utils.py:37 common/utils/ip/utils.py:104 msgid "Unknown" @@ -1043,7 +1047,7 @@ msgid "Gather facts" msgstr "資産情報の収集" #: assets/const/category.py:10 assets/models/asset/host.py:8 -#: settings/serializers/auth/radius.py:16 settings/serializers/auth/sms.py:68 +#: settings/serializers/auth/radius.py:16 settings/serializers/auth/sms.py:67 #: terminal/models/component/endpoint.py:13 terminal/serializers/applet.py:17 #: xpack/plugins/cloud/serializers/account_attrs.py:72 msgid "Host" @@ -1062,7 +1066,7 @@ msgstr "データベース" msgid "Cloud service" msgstr "クラウド サービス" -#: assets/const/category.py:14 assets/models/asset/web.py:16 audits/const.py:33 +#: assets/const/category.py:14 assets/models/asset/web.py:16 audits/const.py:34 #: terminal/models/applet/applet.py:26 msgid "Web" msgstr "Web" @@ -1112,7 +1116,7 @@ msgstr "いろんなタイプ" msgid "Website" msgstr "Webサイト" -#: assets/const/web.py:59 audits/const.py:46 +#: assets/const/web.py:59 audits/const.py:47 #: terminal/serializers/applet_host.py:28 msgid "Disabled" msgstr "無効" @@ -1142,7 +1146,7 @@ msgstr "SSHパブリックキー" #: assets/models/cmd_filter.py:88 assets/models/group.py:23 #: common/db/models.py:36 ops/models/adhoc.py:27 ops/models/job.py:111 #: ops/models/playbook.py:26 rbac/models/role.py:37 settings/models.py:38 -#: terminal/models/applet/applet.py:38 terminal/models/applet/applet.py:237 +#: terminal/models/applet/applet.py:43 terminal/models/applet/applet.py:242 #: terminal/models/applet/host.py:139 terminal/models/component/endpoint.py:24 #: terminal/models/component/endpoint.py:100 #: terminal/models/session/session.py:47 tickets/models/comment.py:32 @@ -1192,7 +1196,7 @@ msgstr "ユーザーと同じユーザー名" #: assets/models/_user.py:52 authentication/models/connection_token.py:39 #: authentication/serializers/connect_token_secret.py:111 -#: terminal/models/applet/applet.py:35 terminal/serializers/session.py:20 +#: terminal/models/applet/applet.py:40 terminal/serializers/session.py:20 #: terminal/serializers/session.py:41 terminal/serializers/storage.py:68 msgid "Protocol" msgstr "プロトコル" @@ -1246,7 +1250,7 @@ msgid "Cloud" msgstr "クラウド サービス" #: assets/models/asset/common.py:92 assets/models/platform.py:14 -#: settings/serializers/auth/radius.py:17 settings/serializers/auth/sms.py:69 +#: settings/serializers/auth/radius.py:17 settings/serializers/auth/sms.py:68 #: xpack/plugins/cloud/serializers/account_attrs.py:73 msgid "Port" msgstr "ポート" @@ -1258,7 +1262,7 @@ msgstr "アドレス" #: assets/models/asset/common.py:151 assets/models/platform.py:112 #: authentication/serializers/connect_token_secret.py:115 #: perms/serializers/user_permission.py:24 -#: xpack/plugins/cloud/serializers/account_attrs.py:196 +#: xpack/plugins/cloud/serializers/account_attrs.py:187 msgid "Platform" msgstr "プラットフォーム" @@ -1339,7 +1343,7 @@ msgid "Submit selector" msgstr "ボタンセレクターを確認する" #: assets/models/automations/base.py:22 ops/models/job.py:187 -#: settings/serializers/auth/sms.py:100 +#: settings/serializers/auth/sms.py:99 msgid "Parameters" msgstr "パラメータ" @@ -1351,9 +1355,9 @@ msgstr "自動化されたタスク" msgid "Asset automation task" msgstr "アセットの自動化タスク" -#: assets/models/automations/base.py:113 audits/models.py:177 +#: assets/models/automations/base.py:113 audits/models.py:199 #: audits/serializers.py:49 ops/models/base.py:49 ops/models/job.py:184 -#: terminal/models/applet/applet.py:236 terminal/models/applet/host.py:136 +#: terminal/models/applet/applet.py:241 terminal/models/applet/host.py:136 #: terminal/models/component/status.py:30 terminal/serializers/applet.py:18 #: terminal/serializers/applet_host.py:103 tickets/models/ticket/general.py:283 #: tickets/serializers/super_ticket.py:13 @@ -1497,7 +1501,7 @@ msgstr "開ける" msgid "Setting" msgstr "設定" -#: assets/models/platform.py:31 audits/const.py:47 settings/models.py:37 +#: assets/models/platform.py:31 audits/const.py:48 settings/models.py:37 #: terminal/serializers/applet_host.py:29 msgid "Enabled" msgstr "有効化" @@ -1724,10 +1728,6 @@ msgstr "値" msgid "Can't contains: /" msgstr "含まれない:/" -#: assets/serializers/node.py:41 -msgid "The same level node name cannot be the same" -msgstr "同じレベルのノード名を同じにすることはできません。" - #: assets/serializers/platform.py:26 msgid "SFTP enabled" msgstr "SFTP が有効" @@ -1860,7 +1860,7 @@ msgstr "Mkdir" msgid "Rmdir" msgstr "Rmdir" -#: audits/const.py:14 audits/const.py:24 +#: audits/const.py:14 audits/const.py:25 #: authentication/templates/authentication/_access_key_modal.html:65 #: perms/const.py:17 rbac/tree.py:230 msgid "Delete" @@ -1882,54 +1882,60 @@ msgstr "Symlink" msgid "Download" msgstr "ダウンロード" -#: audits/const.py:22 rbac/tree.py:228 +#: audits/const.py:19 +#, fuzzy +#| msgid "Rename attr" +msgid "Rename dir" +msgstr "マッピングのプロパティ" + +#: audits/const.py:23 rbac/tree.py:228 msgid "View" msgstr "表示" -#: audits/const.py:25 +#: audits/const.py:26 #: authentication/templates/authentication/_access_key_modal.html:22 #: rbac/tree.py:227 msgid "Create" msgstr "作成" -#: audits/const.py:27 perms/const.py:12 +#: audits/const.py:28 perms/const.py:12 msgid "Connect" msgstr "接続" -#: audits/const.py:28 authentication/templates/authentication/login.html:240 +#: audits/const.py:29 authentication/templates/authentication/login.html:240 #: authentication/templates/authentication/login.html:313 #: templates/_header_bar.html:89 msgid "Login" msgstr "ログイン" -#: audits/const.py:29 ops/const.py:9 +#: audits/const.py:30 ops/const.py:9 msgid "Change password" msgstr "パスワードを変更する" -#: audits/const.py:34 settings/serializers/terminal.py:6 -#: terminal/models/applet/host.py:25 terminal/models/component/terminal.py:162 +#: audits/const.py:35 settings/serializers/terminal.py:6 +#: terminal/models/applet/host.py:25 terminal/models/component/terminal.py:163 #: terminal/serializers/session.py:48 msgid "Terminal" msgstr "ターミナル" -#: audits/const.py:39 audits/models.py:105 +#: audits/const.py:40 audits/models.py:127 msgid "Operate log" msgstr "ログの操作" -#: audits/const.py:40 +#: audits/const.py:41 msgid "Session log" msgstr "セッションログ" -#: audits/const.py:41 +#: audits/const.py:42 msgid "Login log" msgstr "ログインログ" -#: audits/const.py:42 terminal/models/applet/host.py:140 +#: audits/const.py:43 terminal/models/applet/host.py:140 #: terminal/models/component/task.py:24 msgid "Task" msgstr "タスク" -#: audits/const.py:48 +#: audits/const.py:49 msgid "-" msgstr "-" @@ -1941,99 +1947,111 @@ msgstr "是" msgid "No" msgstr "否" -#: audits/models.py:39 +#: audits/models.py:42 msgid "Job audit log" msgstr "ジョブ監査ログ" -#: audits/models.py:46 audits/models.py:73 audits/models.py:144 +#: audits/models.py:51 audits/models.py:95 audits/models.py:166 #: terminal/models/session/session.py:39 terminal/models/session/sharing.py:99 msgid "Remote addr" msgstr "リモートaddr" -#: audits/models.py:51 audits/serializers.py:33 +#: audits/models.py:56 audits/serializers.py:33 msgid "Operate" msgstr "操作" -#: audits/models.py:53 +#: audits/models.py:58 msgid "Filename" msgstr "ファイル名" -#: audits/models.py:58 +#: audits/models.py:61 +msgid "File Record" +msgstr "" + +#: audits/models.py:62 terminal/backends/command/models.py:24 +#: terminal/models/session/replay.py:9 terminal/models/session/sharing.py:18 +#: terminal/models/session/sharing.py:81 +#: terminal/templates/terminal/_msg_command_alert.html:10 +#: tickets/models/ticket/command_confirm.py:15 +msgid "Session" +msgstr "セッション" + +#: audits/models.py:65 msgid "File transfer log" msgstr "ファイル転送ログ" -#: audits/models.py:67 audits/serializers.py:84 +#: audits/models.py:89 audits/serializers.py:84 msgid "Resource Type" msgstr "リソースタイプ" -#: audits/models.py:68 audits/models.py:71 audits/models.py:117 +#: audits/models.py:90 audits/models.py:93 audits/models.py:139 #: audits/serializers.py:83 msgid "Resource" msgstr "リソース" -#: audits/models.py:74 audits/models.py:120 audits/models.py:146 +#: audits/models.py:96 audits/models.py:142 audits/models.py:168 #: terminal/serializers/command.py:50 msgid "Datetime" msgstr "時間" -#: audits/models.py:113 +#: audits/models.py:135 msgid "Activity type" msgstr "活動の種類" -#: audits/models.py:123 +#: audits/models.py:145 msgid "Detail" msgstr "詳細" -#: audits/models.py:126 +#: audits/models.py:148 msgid "Detail ID" msgstr "詳細 ID" -#: audits/models.py:130 +#: audits/models.py:152 msgid "Activity log" msgstr "活動記録" -#: audits/models.py:142 +#: audits/models.py:164 msgid "Change by" msgstr "による変更" -#: audits/models.py:152 +#: audits/models.py:174 msgid "Password change log" msgstr "パスワード変更ログ" -#: audits/models.py:159 +#: audits/models.py:181 msgid "Login type" msgstr "ログインタイプ" -#: audits/models.py:161 tickets/models/ticket/login_confirm.py:10 +#: audits/models.py:183 tickets/models/ticket/login_confirm.py:10 msgid "Login IP" msgstr "ログインIP" -#: audits/models.py:163 +#: audits/models.py:185 #: authentication/templates/authentication/_msg_different_city.html:11 #: tickets/models/ticket/login_confirm.py:11 msgid "Login city" msgstr "ログイン都市" -#: audits/models.py:166 audits/serializers.py:63 +#: audits/models.py:188 audits/serializers.py:63 msgid "User agent" msgstr "ユーザーエージェント" -#: audits/models.py:169 audits/serializers.py:47 +#: audits/models.py:191 audits/serializers.py:47 #: authentication/templates/authentication/_mfa_confirm_modal.html:14 #: users/forms/profile.py:65 users/models/user.py:776 #: users/serializers/profile.py:126 msgid "MFA" msgstr "MFA" -#: audits/models.py:179 +#: audits/models.py:201 msgid "Date login" msgstr "日付ログイン" -#: audits/models.py:181 audits/serializers.py:65 +#: audits/models.py:203 audits/serializers.py:65 msgid "Authentication backend" msgstr "認証バックエンド" -#: audits/models.py:225 +#: audits/models.py:247 msgid "User login log" msgstr "ユーザーログインログ" @@ -2100,10 +2118,16 @@ msgstr "DingTalk" msgid "Temporary token" msgstr "仮パスワード" -#: audits/tasks.py:90 +#: audits/tasks.py:101 msgid "Clean audits session task log" msgstr "監査セッション タスク ログのクリーンアップ" +#: audits/tasks.py:114 +#, fuzzy +#| msgid "Upload session replay to external storage" +msgid "Upload FTP file to external storage" +msgstr "セッションの記録を外部ストレージにアップロードする" + #: authentication/api/confirm.py:40 msgid "This action require verify your MFA" msgstr "この操作には、MFAを検証する必要があります" @@ -2520,55 +2544,61 @@ msgid "Connect method" msgstr "接続方法" #: authentication/models/connection_token.py:41 +#, fuzzy +#| msgid "Connections" +msgid "Connect options" +msgstr "接続" + +#: authentication/models/connection_token.py:42 #: rbac/serializers/rolebinding.py:21 msgid "User display" msgstr "ユーザー表示" -#: authentication/models/connection_token.py:42 +#: authentication/models/connection_token.py:43 msgid "Asset display" msgstr "アセット名" -#: authentication/models/connection_token.py:43 +#: authentication/models/connection_token.py:44 msgid "Reusable" msgstr "再利用可能" -#: authentication/models/connection_token.py:44 +#: authentication/models/connection_token.py:45 #: authentication/models/temp_token.py:13 perms/models/asset_permission.py:74 #: tickets/models/ticket/apply_application.py:31 #: tickets/models/ticket/apply_asset.py:20 users/models/user.py:797 msgid "Date expired" msgstr "期限切れの日付" -#: authentication/models/connection_token.py:48 +#: authentication/models/connection_token.py:49 #: perms/models/asset_permission.py:77 msgid "From ticket" msgstr "チケットから" -#: authentication/models/connection_token.py:54 +#: authentication/models/connection_token.py:55 msgid "Connection token" msgstr "接続トークン" -#: authentication/models/connection_token.py:56 +#: authentication/models/connection_token.py:57 msgid "Can view connection token secret" msgstr "接続トークンの秘密を表示できます" -#: authentication/models/connection_token.py:103 +#: authentication/models/connection_token.py:104 msgid "Connection token inactive" msgstr "接続トークンがアクティブ化されていません" -#: authentication/models/connection_token.py:106 +#: authentication/models/connection_token.py:107 msgid "Connection token expired at: {}" msgstr "接続トークンの有効期限: {}" -#: authentication/models/connection_token.py:109 +#: authentication/models/connection_token.py:110 msgid "No user or invalid user" msgstr "ユーザーなしまたは期限切れのユーザー" -#: authentication/models/connection_token.py:112 +#: authentication/models/connection_token.py:113 msgid "No asset or inactive asset" msgstr "アセットがないか、有効化されていないアセット" -#: authentication/models/connection_token.py:264 +#: authentication/models/connection_token.py:265 msgid "Super connection token" msgstr "スーパー接続トークン" @@ -3090,26 +3120,26 @@ msgstr "テキストフィールドへのマーシャルデータ" msgid "Encrypt field using Secret Key" msgstr "Secret Keyを使用したフィールドの暗号化" -#: common/db/fields.py:535 +#: common/db/fields.py:539 msgid "" "Invalid JSON data for JSONManyToManyField, should be like {'type': 'all'} or " "{'type': 'ids', 'ids': []} or {'type': 'attrs', 'attrs': [{'name': 'ip', " "'match': 'exact', 'value': '1.1.1.1'}}" msgstr "" -#: common/db/fields.py:542 +#: common/db/fields.py:546 msgid "Invalid type, should be \"all\", \"ids\" or \"attrs\"" msgstr "無効なタイプです。all、ids、またはattrsでなければなりません" -#: common/db/fields.py:545 +#: common/db/fields.py:549 msgid "Invalid ids for ids, should be a list" msgstr "無効なID、リストでなければなりません" -#: common/db/fields.py:548 common/db/fields.py:551 +#: common/db/fields.py:552 common/db/fields.py:555 msgid "Invalid attrs, should be a list of dict" msgstr "無効な属性、dictリストでなければなりません" -#: common/db/fields.py:553 +#: common/db/fields.py:557 msgid "Invalid attrs, should be has name and value" msgstr "名前と値が必要な無効な属性" @@ -3783,7 +3813,7 @@ msgstr "組織" msgid "Org name" msgstr "組織名" -#: orgs/models.py:70 rbac/models/role.py:36 terminal/models/applet/applet.py:34 +#: orgs/models.py:70 rbac/models/role.py:36 terminal/models/applet/applet.py:39 msgid "Builtin" msgstr "ビルトイン" @@ -4028,7 +4058,7 @@ msgstr "パーマ" msgid "Users amount" msgstr "ユーザー数" -#: rbac/serializers/role.py:28 terminal/models/applet/applet.py:29 +#: rbac/serializers/role.py:28 terminal/models/applet/applet.py:33 msgid "Display name" msgstr "表示名" @@ -4092,8 +4122,8 @@ msgstr "タスクセンター" msgid "My assets" msgstr "私の資産" -#: rbac/tree.py:56 terminal/models/applet/applet.py:45 -#: terminal/models/applet/applet.py:233 terminal/models/applet/host.py:28 +#: rbac/tree.py:56 terminal/models/applet/applet.py:50 +#: terminal/models/applet/applet.py:238 terminal/models/applet/host.py:28 #: terminal/serializers/applet.py:15 msgid "Applet" msgstr "リモートアプリケーション" @@ -4520,46 +4550,46 @@ msgstr "SMSの有効化" msgid "SMS provider / Protocol" msgstr "SMSプロバイダ / プロトコル" -#: settings/serializers/auth/sms.py:23 settings/serializers/auth/sms.py:46 -#: settings/serializers/auth/sms.py:54 settings/serializers/auth/sms.py:63 -#: settings/serializers/auth/sms.py:74 settings/serializers/email.py:69 +#: settings/serializers/auth/sms.py:23 settings/serializers/auth/sms.py:45 +#: settings/serializers/auth/sms.py:53 settings/serializers/auth/sms.py:62 +#: settings/serializers/auth/sms.py:73 settings/serializers/email.py:69 msgid "Signature" msgstr "署名" -#: settings/serializers/auth/sms.py:24 settings/serializers/auth/sms.py:47 -#: settings/serializers/auth/sms.py:55 settings/serializers/auth/sms.py:64 +#: settings/serializers/auth/sms.py:24 settings/serializers/auth/sms.py:46 +#: settings/serializers/auth/sms.py:54 settings/serializers/auth/sms.py:63 msgid "Template code" msgstr "テンプレートコード" -#: settings/serializers/auth/sms.py:32 +#: settings/serializers/auth/sms.py:31 msgid "Test phone" msgstr "テスト電話" -#: settings/serializers/auth/sms.py:61 +#: settings/serializers/auth/sms.py:60 msgid "App Access Address" msgstr "アプリケーションアドレス" -#: settings/serializers/auth/sms.py:62 +#: settings/serializers/auth/sms.py:61 msgid "Signature channel number" msgstr "署名チャネル番号" -#: settings/serializers/auth/sms.py:70 +#: settings/serializers/auth/sms.py:69 msgid "Enterprise code(SP id)" msgstr "企業コード(SP id)" -#: settings/serializers/auth/sms.py:71 +#: settings/serializers/auth/sms.py:70 msgid "Shared secret(Shared secret)" msgstr "パスワードを共有する(Shared secret)" -#: settings/serializers/auth/sms.py:72 +#: settings/serializers/auth/sms.py:71 msgid "Original number(Src id)" msgstr "元の番号(Src id)" -#: settings/serializers/auth/sms.py:73 +#: settings/serializers/auth/sms.py:72 msgid "Business type(Service id)" msgstr "ビジネス・タイプ(Service id)" -#: settings/serializers/auth/sms.py:77 +#: settings/serializers/auth/sms.py:76 #, python-brace-format msgid "" "Template need contain {code} and Signature + template length does not exceed " @@ -4570,24 +4600,24 @@ msgstr "" "満です。たとえば、認証コードは{code}で、有効期間は5分です。他の人には言わない" "でください。" -#: settings/serializers/auth/sms.py:86 +#: settings/serializers/auth/sms.py:85 #, python-brace-format msgid "The template needs to contain {code}" msgstr "テンプレートには{code}を含める必要があります" -#: settings/serializers/auth/sms.py:89 +#: settings/serializers/auth/sms.py:88 msgid "Signature + Template must not exceed 65 words" msgstr "署名+テンプレートの長さは65文字以内" -#: settings/serializers/auth/sms.py:98 +#: settings/serializers/auth/sms.py:97 msgid "URL" msgstr "" -#: settings/serializers/auth/sms.py:103 +#: settings/serializers/auth/sms.py:102 msgid "Request method" msgstr "請求方法です" -#: settings/serializers/auth/sms.py:112 +#: settings/serializers/auth/sms.py:111 #, python-format msgid "The value in the parameter must contain %s" msgstr "パラメータの値には必ず %s が含まれます" @@ -4606,7 +4636,7 @@ msgid "SSO auth key TTL" msgstr "Token有効期間" #: settings/serializers/auth/sso.py:17 -#: xpack/plugins/cloud/serializers/account_attrs.py:193 +#: xpack/plugins/cloud/serializers/account_attrs.py:184 msgid "Unit: second" msgstr "単位: 秒" @@ -5546,7 +5576,7 @@ msgstr "コマンドストア" msgid "Invalid" msgstr "無効" -#: terminal/api/component/storage.py:119 terminal/tasks.py:139 +#: terminal/api/component/storage.py:119 terminal/tasks.py:140 msgid "Test failure: {}" msgstr "テスト失敗: {}" @@ -5555,7 +5585,7 @@ msgid "Test successful" msgstr "テスト成功" #: terminal/api/component/storage.py:124 terminal/notifications.py:179 -#: terminal/tasks.py:143 +#: terminal/tasks.py:144 msgid "Test failure: Account invalid" msgstr "テスト失敗: アカウントが無効" @@ -5599,20 +5629,11 @@ msgstr "入力" msgid "Output" msgstr "出力" -#: terminal/backends/command/models.py:24 terminal/models/session/replay.py:9 -#: terminal/models/session/sharing.py:18 terminal/models/session/sharing.py:81 -#: terminal/templates/terminal/_msg_command_alert.html:10 -#: tickets/models/ticket/command_confirm.py:15 -msgid "Session" -msgstr "セッション" - #: terminal/backends/command/models.py:27 terminal/serializers/command.py:22 msgid "Risk level" msgstr "リスクレベル" -#: terminal/connect_methods.py:54 terminal/connect_methods.py:55 -#: terminal/connect_methods.py:56 terminal/connect_methods.py:57 -#: terminal/connect_methods.py:58 +#: terminal/connect_methods.py:55 msgid "DB Client" msgstr "データベース クライアント" @@ -5657,39 +5678,57 @@ msgstr "一括作成非サポート" msgid "Storage is invalid" msgstr "ストレージが無効です" -#: terminal/models/applet/applet.py:31 +#: terminal/models/applet/applet.py:29 +#, fuzzy +#| msgid "Comment" +msgid "Community" +msgstr "コメント" + +#: terminal/models/applet/applet.py:30 +#, fuzzy +#| msgid "Enterprise edition" +msgid "Enterprise" +msgstr "エンタープライズ版" + +#: terminal/models/applet/applet.py:35 msgid "Author" msgstr "著者" #: terminal/models/applet/applet.py:36 +#, fuzzy +#| msgid "Action" +msgid "Edition" +msgstr "アクション" + +#: terminal/models/applet/applet.py:41 msgid "Can concurrent" msgstr "同時実行可能" -#: terminal/models/applet/applet.py:37 +#: terminal/models/applet/applet.py:42 msgid "Tags" msgstr "ラベル" -#: terminal/models/applet/applet.py:41 terminal/serializers/storage.py:157 +#: terminal/models/applet/applet.py:46 terminal/serializers/storage.py:157 msgid "Hosts" msgstr "ホスト" -#: terminal/models/applet/applet.py:86 +#: terminal/models/applet/applet.py:91 msgid "Applet pkg not valid, Missing file {}" msgstr "無効なアプレット パッケージ、ファイル {} がありません" -#: terminal/models/applet/applet.py:105 +#: terminal/models/applet/applet.py:110 msgid "Load platform.yml failed: {}" msgstr "" -#: terminal/models/applet/applet.py:108 +#: terminal/models/applet/applet.py:113 msgid "Only support custom platform" msgstr "" -#: terminal/models/applet/applet.py:113 +#: terminal/models/applet/applet.py:118 msgid "Missing type in platform.yml" msgstr "" -#: terminal/models/applet/applet.py:235 terminal/models/applet/host.py:34 +#: terminal/models/applet/applet.py:240 terminal/models/applet/host.py:34 #: terminal/models/applet/host.py:134 msgid "Hosting" msgstr "ホスト マシン" @@ -5816,7 +5855,7 @@ msgstr "リモートアドレス" msgid "Application User" msgstr "ユーザーの適用" -#: terminal/models/component/terminal.py:164 +#: terminal/models/component/terminal.py:165 msgid "Can view terminal config" msgstr "ターミナル構成を表示できます" @@ -6185,19 +6224,19 @@ msgstr "オフライン セッションをクリアする" msgid "Upload session replay to external storage" msgstr "セッションの記録を外部ストレージにアップロードする" -#: terminal/tasks.py:89 +#: terminal/tasks.py:90 msgid "Run applet host deployment" msgstr "アプリケーション マシンの展開を実行する" -#: terminal/tasks.py:99 +#: terminal/tasks.py:100 msgid "Install applet" msgstr "アプリをインストールする" -#: terminal/tasks.py:109 +#: terminal/tasks.py:110 msgid "Generate applet host accounts" msgstr "リモートアプリケーション上のアカウントを収集する" -#: terminal/tasks.py:121 +#: terminal/tasks.py:122 msgid "Check command replay storage connectivity" msgstr "チェックコマンドと録画ストレージの接続性" @@ -7276,7 +7315,7 @@ msgstr "クラウドアカウント" msgid "Test cloud account" msgstr "クラウドアカウントのテスト" -#: xpack/plugins/cloud/models.py:88 xpack/plugins/cloud/serializers/task.py:36 +#: xpack/plugins/cloud/models.py:88 xpack/plugins/cloud/serializers/task.py:37 msgid "Regions" msgstr "リージョン" @@ -7284,15 +7323,15 @@ msgstr "リージョン" msgid "Hostname strategy" msgstr "ホスト名戦略" -#: xpack/plugins/cloud/models.py:102 xpack/plugins/cloud/serializers/task.py:39 +#: xpack/plugins/cloud/models.py:102 xpack/plugins/cloud/serializers/task.py:40 msgid "IP network segment group" msgstr "IPネットワークセグメントグループ" -#: xpack/plugins/cloud/models.py:105 xpack/plugins/cloud/serializers/task.py:44 +#: xpack/plugins/cloud/models.py:105 xpack/plugins/cloud/serializers/task.py:45 msgid "Sync IP type" msgstr "同期IPタイプ" -#: xpack/plugins/cloud/models.py:108 xpack/plugins/cloud/serializers/task.py:61 +#: xpack/plugins/cloud/models.py:108 xpack/plugins/cloud/serializers/task.py:62 msgid "Always update" msgstr "常に更新" @@ -7577,11 +7616,15 @@ msgstr "ファイルはJSON形式です。" msgid "IP address invalid `{}`, {}" msgstr "IPアドレスが無効: '{}', {}" -#: xpack/plugins/cloud/serializers/account_attrs.py:172 -msgid "Such as: 192.168.1.0/24, 10.0.0.0-10.0.0.255" +#: xpack/plugins/cloud/serializers/account_attrs.py:162 +#, fuzzy +#| msgid "Such as: 192.168.1.0/24, 10.0.0.0-10.0.0.255" +msgid "" +"Format for comma-delimited string,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:175 +#: xpack/plugins/cloud/serializers/account_attrs.py:166 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 " @@ -7591,29 +7634,36 @@ msgstr "" "実行されると、有効な IP アドレスのみが同期されます。
ポートが0の場合、す" "べてのIPアドレスが有効です。" -#: xpack/plugins/cloud/serializers/account_attrs.py:183 +#: xpack/plugins/cloud/serializers/account_attrs.py:174 msgid "Hostname prefix" msgstr "ホスト名プレフィックス" -#: xpack/plugins/cloud/serializers/account_attrs.py:186 +#: xpack/plugins/cloud/serializers/account_attrs.py:177 msgid "IP segment" msgstr "IP セグメント" -#: xpack/plugins/cloud/serializers/account_attrs.py:190 +#: xpack/plugins/cloud/serializers/account_attrs.py:181 msgid "Test port" msgstr "テストポート" -#: xpack/plugins/cloud/serializers/account_attrs.py:193 +#: xpack/plugins/cloud/serializers/account_attrs.py:184 msgid "Test timeout" msgstr "テストタイムアウト" #: xpack/plugins/cloud/serializers/task.py:28 +#, fuzzy +#| msgid "" +#| "Only instances matching the IP range will be synced.
If the instance " +#| "contains multiple IP addresses, the first IP address that matches will be " +#| "used as the IP for the created asset.
The default value of * means " +#| "sync all instances and randomly match IP addresses.
Such as: " +#| "192.168.1.0/24, 10.1.1.1-10.1.1.20" msgid "" "Only instances matching the IP range will be synced.
If the instance " "contains multiple IP addresses, the first IP address that matches will be " "used as the IP for the created asset.
The default value of * means sync " -"all instances and randomly match IP addresses.
Such as: 192.168.1.0/24, " -"10.1.1.1-10.1.1.20" +"all instances and randomly match IP addresses.
Format for comma-" +"delimited string, Such as: 192.168.1.0/24, 10.1.1.1-10.1.1.20" msgstr "" "IP範囲に一致するインスタンスのみが同期されます。
インスタンスに複数のIPア" "ドレスが含まれている場合、一致する最初のIPアドレスが作成されたアセットのIPと" @@ -7621,11 +7671,11 @@ msgstr "" "ドレスをランダムに一致させることを意味します。
例: " "192.168.1.0/24,10.1.1.1-10.1.1.20" -#: xpack/plugins/cloud/serializers/task.py:34 +#: xpack/plugins/cloud/serializers/task.py:35 msgid "History count" msgstr "実行回数" -#: xpack/plugins/cloud/serializers/task.py:35 +#: xpack/plugins/cloud/serializers/task.py:36 msgid "Instance count" msgstr "インスタンス数" @@ -7685,22 +7735,25 @@ msgstr "ライセンスのインポートに成功" msgid "License is invalid" msgstr "ライセンスが無効です" -#: xpack/plugins/license/meta.py:11 xpack/plugins/license/models.py:138 +#: xpack/plugins/license/meta.py:11 xpack/plugins/license/models.py:135 msgid "License" msgstr "ライセンス" -#: xpack/plugins/license/models.py:80 +#: xpack/plugins/license/models.py:79 msgid "Standard edition" msgstr "標準版" -#: xpack/plugins/license/models.py:82 +#: xpack/plugins/license/models.py:81 msgid "Enterprise edition" msgstr "エンタープライズ版" -#: xpack/plugins/license/models.py:84 +#: xpack/plugins/license/models.py:83 msgid "Ultimate edition" msgstr "究極のエディション" -#: xpack/plugins/license/models.py:86 +#: xpack/plugins/license/models.py:85 msgid "Community edition" msgstr "コミュニティ版" + +#~ msgid "Reviewers amount" +#~ msgstr "承認者数" diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 6a20beeda..ad2f7c7f8 100644 --- a/apps/locale/zh/LC_MESSAGES/django.mo +++ b/apps/locale/zh/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f236155485cdb4b453ff317d3c932ef4455d29e856ef3c2902a349d430992404 -size 117637 +oid sha256:4a22b436e9707729e51614e9942bb9715084ddf613152fa35be7a092a77daca7 +size 117063 diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 04c98066b..7540ebf5d 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: 2023-05-31 18:12+0800\n" +"POT-Creation-Date: 2023-06-09 10:59+0800\n" "PO-Revision-Date: 2021-05-20 10:54+0800\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -70,7 +70,7 @@ msgid "Collected" msgstr "收集" #: accounts/const/account.py:21 accounts/serializers/account/account.py:26 -#: settings/serializers/auth/sms.py:76 +#: settings/serializers/auth/sms.py:75 msgid "Template" msgstr "模板" @@ -78,13 +78,13 @@ msgstr "模板" msgid "Skip" msgstr "跳过" -#: accounts/const/account.py:26 audits/const.py:23 rbac/tree.py:229 +#: accounts/const/account.py:26 audits/const.py:24 rbac/tree.py:229 #: templates/_csv_import_export.html:18 templates/_csv_update_modal.html:6 msgid "Update" msgstr "更新" #: accounts/const/account.py:27 -#: accounts/serializers/automations/change_secret.py:156 audits/const.py:53 +#: accounts/serializers/automations/change_secret.py:156 audits/const.py:54 #: audits/signal_handlers/activity_log.py:33 common/const/choices.py:19 #: ops/const.py:58 terminal/const.py:61 xpack/plugins/cloud/const.py:41 msgid "Failed" @@ -185,10 +185,10 @@ msgstr "仅创建" #: accounts/serializers/account/gathered_account.py:10 #: accounts/serializers/automations/change_secret.py:112 #: accounts/serializers/automations/change_secret.py:132 -#: acls/serializers/base.py:76 assets/models/asset/common.py:93 +#: acls/serializers/base.py:118 assets/models/asset/common.py:93 #: assets/models/asset/common.py:332 assets/models/cmd_filter.py:36 #: assets/serializers/domain.py:19 assets/serializers/label.py:27 -#: audits/models.py:48 authentication/models/connection_token.py:34 +#: audits/models.py:53 authentication/models/connection_token.py:34 #: perms/models/asset_permission.py:64 perms/serializers/permission.py:34 #: terminal/backends/command/models.py:20 terminal/models/session/session.py:32 #: terminal/notifications.py:95 terminal/serializers/command.py:17 @@ -205,7 +205,7 @@ msgid "Su from" msgstr "切换自" #: accounts/models/account.py:55 settings/serializers/auth/cas.py:20 -#: settings/serializers/auth/feishu.py:20 terminal/models/applet/applet.py:30 +#: settings/serializers/auth/feishu.py:20 terminal/models/applet/applet.py:34 msgid "Version" msgstr "版本" @@ -221,8 +221,8 @@ msgstr "来源 ID" #: accounts/models/account.py:61 #: accounts/serializers/automations/change_secret.py:113 #: accounts/serializers/automations/change_secret.py:133 -#: acls/serializers/base.py:77 assets/serializers/asset/common.py:125 -#: assets/serializers/gateway.py:28 audits/models.py:49 ops/models/base.py:18 +#: acls/serializers/base.py:119 assets/serializers/asset/common.py:125 +#: assets/serializers/gateway.py:28 audits/models.py:54 ops/models/base.py:18 #: perms/models/asset_permission.py:70 perms/serializers/permission.py:39 #: terminal/backends/command/models.py:21 terminal/models/session/session.py:34 #: tickets/models/ticket/command_confirm.py:13 xpack/plugins/cloud/models.py:85 @@ -274,7 +274,7 @@ msgid "Account backup plan" msgstr "账号备份计划" #: accounts/models/automations/backup_account.py:83 -#: assets/models/automations/base.py:115 audits/models.py:55 +#: assets/models/automations/base.py:115 audits/models.py:60 #: ops/models/base.py:55 ops/models/celery.py:63 ops/models/job.py:192 #: ops/templates/ops/celery_task_log.html:75 #: perms/models/asset_permission.py:72 terminal/models/applet/host.py:137 @@ -302,7 +302,7 @@ msgstr "账号备份快照" msgid "Trigger mode" msgstr "触发模式" -#: accounts/models/automations/backup_account.py:97 audits/models.py:172 +#: accounts/models/automations/backup_account.py:97 audits/models.py:194 #: terminal/models/session/sharing.py:111 xpack/plugins/cloud/models.py:168 msgid "Reason" msgstr "原因" @@ -425,8 +425,8 @@ msgstr "最后登录日期" #: accounts/models/automations/gather_account.py:17 #: accounts/models/automations/push_account.py:15 accounts/models/base.py:34 -#: acls/serializers/base.py:19 acls/serializers/base.py:50 -#: assets/models/_user.py:23 audits/models.py:157 authentication/forms.py:25 +#: acls/serializers/base.py:18 acls/serializers/base.py:49 +#: assets/models/_user.py:23 audits/models.py:179 authentication/forms.py:25 #: authentication/forms.py:27 authentication/models/temp_token.py:9 #: authentication/templates/authentication/_msg_different_city.html:9 #: authentication/templates/authentication/_msg_oauth_bind.html:9 @@ -458,8 +458,8 @@ msgid "Triggers" msgstr "触发方式" #: accounts/models/automations/push_account.py:16 acls/models/base.py:43 -#: acls/serializers/base.py:57 assets/models/cmd_filter.py:81 -#: audits/models.py:65 audits/serializers.py:82 +#: acls/serializers/base.py:56 assets/models/cmd_filter.py:81 +#: audits/models.py:87 audits/serializers.py:82 #: authentication/serializers/connect_token_secret.py:116 #: authentication/templates/authentication/_access_key_modal.html:34 msgid "Action" @@ -473,8 +473,8 @@ msgstr "账号推送" msgid "Verify asset account" msgstr "账号验证" -#: accounts/models/base.py:33 acls/models/base.py:37 -#: acls/models/command_acl.py:21 acls/serializers/base.py:35 +#: accounts/models/base.py:33 acls/models/base.py:37 acls/models/base.py:97 +#: acls/models/command_acl.py:21 acls/serializers/base.py:34 #: applications/models.py:9 assets/models/_user.py:22 #: assets/models/asset/common.py:91 assets/models/asset/common.py:149 #: assets/models/cmd_filter.py:21 assets/models/domain.py:18 @@ -487,7 +487,7 @@ msgstr "账号验证" #: ops/models/job.py:92 ops/models/playbook.py:23 ops/serializers/job.py:20 #: orgs/models.py:69 perms/models/asset_permission.py:56 rbac/models/role.py:29 #: settings/models.py:33 settings/serializers/sms.py:6 -#: terminal/models/applet/applet.py:28 terminal/models/component/endpoint.py:12 +#: terminal/models/applet/applet.py:32 terminal/models/component/endpoint.py:12 #: terminal/models/component/endpoint.py:90 #: terminal/models/component/storage.py:26 terminal/models/component/task.py:15 #: terminal/models/component/terminal.py:84 users/forms/profile.py:33 @@ -504,7 +504,7 @@ msgstr "特权账号" #: assets/models/automations/base.py:21 assets/models/cmd_filter.py:39 #: assets/models/label.py:22 #: authentication/serializers/connect_token_secret.py:114 -#: terminal/models/applet/applet.py:33 users/serializers/user.py:170 +#: terminal/models/applet/applet.py:38 users/serializers/user.py:170 msgid "Is active" msgstr "激活" @@ -571,7 +571,7 @@ msgstr "类别" #: assets/serializers/asset/common.py:122 assets/serializers/platform.py:94 #: assets/serializers/platform.py:109 audits/serializers.py:48 #: authentication/serializers/connect_token_secret.py:123 ops/models/job.py:103 -#: perms/serializers/user_permission.py:27 terminal/models/applet/applet.py:32 +#: perms/serializers/user_permission.py:27 terminal/models/applet/applet.py:37 #: terminal/models/component/storage.py:57 #: terminal/models/component/storage.py:146 terminal/serializers/applet.py:29 #: terminal/serializers/session.py:22 terminal/serializers/storage.py:224 @@ -603,7 +603,7 @@ msgid "Changed" msgstr "已修改" #: accounts/serializers/account/account.py:249 -#: accounts/serializers/automations/base.py:22 acls/models/base.py:84 +#: accounts/serializers/automations/base.py:22 acls/models/base.py:98 #: assets/models/automations/base.py:19 #: assets/serializers/automations/base.py:20 ops/models/base.py:17 #: ops/models/job.py:105 ops/serializers/job.py:21 @@ -625,16 +625,15 @@ msgid "Account has exist" msgstr "账号已存在" #: accounts/serializers/account/account.py:417 -#: authentication/serializers/connect_token_secret.py:154 +#: authentication/serializers/connect_token_secret.py:156 #: authentication/templates/authentication/_access_key_modal.html:30 #: perms/models/perm_node.py:21 users/serializers/group.py:33 msgid "ID" msgstr "ID" -#: accounts/serializers/account/account.py:424 acls/models/login_acl.py:12 -#: acls/serializers/base.py:75 acls/serializers/login_acl.py:21 -#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:44 -#: audits/models.py:63 audits/models.py:141 +#: accounts/serializers/account/account.py:424 acls/serializers/base.py:111 +#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:49 +#: audits/models.py:85 audits/models.py:163 #: authentication/models/connection_token.py:30 #: authentication/models/sso_token.py:16 #: notifications/models/notification.py:12 @@ -723,8 +722,8 @@ msgstr "* 密码长度范围 6-30 位" msgid "Automation task execution" msgstr "自动化任务执行历史" -#: accounts/serializers/automations/change_secret.py:155 audits/const.py:52 -#: audits/models.py:54 audits/signal_handlers/activity_log.py:33 +#: accounts/serializers/automations/change_secret.py:155 audits/const.py:53 +#: audits/models.py:59 audits/signal_handlers/activity_log.py:33 #: common/const/choices.py:18 ops/const.py:56 ops/serializers/celery.py:40 #: terminal/const.py:60 terminal/models/session/sharing.py:107 #: tickets/views/approve.py:114 @@ -798,14 +797,13 @@ msgstr "优先级" msgid "1-100, the lower the value will be match first" msgstr "优先级可选范围为 1-100 (数值越小越优先)" -#: acls/models/base.py:44 acls/serializers/base.py:79 -#: acls/serializers/login_acl.py:23 assets/models/cmd_filter.py:86 +#: acls/models/base.py:44 assets/models/cmd_filter.py:86 #: authentication/serializers/connect_token_secret.py:88 msgid "Reviewers" msgstr "审批人" #: acls/models/base.py:45 authentication/models/access_key.py:17 -#: authentication/models/connection_token.py:50 +#: authentication/models/connection_token.py:51 #: authentication/templates/authentication/_access_key_modal.html:32 #: perms/models/asset_permission.py:76 terminal/models/session/sharing.py:27 #: tickets/const.py:37 @@ -816,7 +814,7 @@ msgstr "激活中" msgid "Users" msgstr "用户管理" -#: acls/models/base.py:85 assets/models/automations/base.py:17 +#: acls/models/base.py:99 assets/models/automations/base.py:17 #: assets/models/cmd_filter.py:38 assets/serializers/asset/common.py:305 #: rbac/tree.py:35 msgid "Accounts" @@ -835,7 +833,7 @@ msgid "Regex" msgstr "正则表达式" #: acls/models/command_acl.py:26 assets/models/cmd_filter.py:79 -#: settings/serializers/basic.py:10 xpack/plugins/license/models.py:30 +#: settings/serializers/basic.py:10 xpack/plugins/license/models.py:29 msgid "Content" msgstr "内容" @@ -865,16 +863,22 @@ msgstr "命令过滤" msgid "Command confirm" msgstr "命令复核" -#: acls/models/login_acl.py:15 acls/models/login_asset_acl.py:9 -#: acls/serializers/login_acl.py:28 acls/serializers/login_asset_acl.py:13 +#: acls/models/connect_method.py:10 +#, fuzzy +#| msgid "Connect method" +msgid "Connect methods" +msgstr "连接方式" + +#: acls/models/login_acl.py:11 acls/models/login_asset_acl.py:9 +#: acls/serializers/login_acl.py:15 acls/serializers/login_asset_acl.py:13 msgid "Rule" msgstr "规则" -#: acls/models/login_acl.py:18 +#: acls/models/login_acl.py:14 msgid "Login acl" msgstr "登录访问控制" -#: acls/models/login_acl.py:39 tickets/const.py:10 +#: acls/models/login_acl.py:27 tickets/const.py:10 msgid "Login confirm" msgstr "登录复核" @@ -886,11 +890,11 @@ msgstr "登录资产访问控制" msgid "Login asset confirm" msgstr "登录资产复核" -#: acls/serializers/base.py:11 acls/serializers/login_acl.py:16 +#: acls/serializers/base.py:10 acls/serializers/login_acl.py:11 msgid "With * indicating a match all. " msgstr "* 表示匹配所有. " -#: acls/serializers/base.py:26 +#: acls/serializers/base.py:25 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 (Domain name " @@ -899,19 +903,15 @@ 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 (支持网域)" -#: acls/serializers/base.py:41 assets/serializers/asset/host.py:19 +#: acls/serializers/base.py:40 assets/serializers/asset/host.py:19 msgid "IP/Host" msgstr "IP/主机" -#: acls/serializers/base.py:82 acls/serializers/login_acl.py:26 -msgid "Reviewers amount" -msgstr "审批人数量" - -#: acls/serializers/base.py:108 tickets/serializers/ticket/ticket.py:77 +#: acls/serializers/base.py:98 tickets/serializers/ticket/ticket.py:77 msgid "The organization `{}` does not exist" msgstr "组织 `{}` 不存在" -#: acls/serializers/base.py:114 +#: acls/serializers/base.py:104 msgid "None of the reviewers belong to Organization `{}`" msgstr "所有复核人都不属于组织 `{}`" @@ -981,6 +981,10 @@ msgstr "不能删除根节点 ({})" msgid "Deletion failed and the node contains assets" msgstr "删除失败,节点包含资产" +#: assets/api/tree.py:49 assets/serializers/node.py:41 +msgid "The same level node name cannot be the same" +msgstr "同级别节点名字不能重复" + #: assets/apps.py:9 msgid "App assets" msgstr "资产管理" @@ -990,7 +994,7 @@ msgid "{} disabled" msgstr "{} 已禁用" #: assets/automations/ping_gateway/manager.py:33 -#: authentication/models/connection_token.py:115 +#: authentication/models/connection_token.py:116 msgid "No account" msgstr "没有账号" @@ -1013,7 +1017,7 @@ msgstr "认证失败" msgid "Connect failed" msgstr "连接失败" -#: assets/const/automation.py:6 audits/const.py:6 audits/const.py:35 +#: assets/const/automation.py:6 audits/const.py:6 audits/const.py:36 #: audits/signal_handlers/activity_log.py:62 common/utils/ip/geoip/utils.py:31 #: common/utils/ip/geoip/utils.py:37 common/utils/ip/utils.py:104 msgid "Unknown" @@ -1036,7 +1040,7 @@ msgid "Gather facts" msgstr "收集资产信息" #: assets/const/category.py:10 assets/models/asset/host.py:8 -#: settings/serializers/auth/radius.py:16 settings/serializers/auth/sms.py:68 +#: settings/serializers/auth/radius.py:16 settings/serializers/auth/sms.py:67 #: terminal/models/component/endpoint.py:13 terminal/serializers/applet.py:17 #: xpack/plugins/cloud/serializers/account_attrs.py:72 msgid "Host" @@ -1055,7 +1059,7 @@ msgstr "数据库" msgid "Cloud service" msgstr "云服务" -#: assets/const/category.py:14 assets/models/asset/web.py:16 audits/const.py:33 +#: assets/const/category.py:14 assets/models/asset/web.py:16 audits/const.py:34 #: terminal/models/applet/applet.py:26 msgid "Web" msgstr "Web" @@ -1105,7 +1109,7 @@ msgstr "所有类型" msgid "Website" msgstr "网站" -#: assets/const/web.py:59 audits/const.py:46 +#: assets/const/web.py:59 audits/const.py:47 #: terminal/serializers/applet_host.py:28 msgid "Disabled" msgstr "禁用" @@ -1135,7 +1139,7 @@ msgstr "SSH公钥" #: assets/models/cmd_filter.py:88 assets/models/group.py:23 #: common/db/models.py:36 ops/models/adhoc.py:27 ops/models/job.py:111 #: ops/models/playbook.py:26 rbac/models/role.py:37 settings/models.py:38 -#: terminal/models/applet/applet.py:38 terminal/models/applet/applet.py:237 +#: terminal/models/applet/applet.py:43 terminal/models/applet/applet.py:242 #: terminal/models/applet/host.py:139 terminal/models/component/endpoint.py:24 #: terminal/models/component/endpoint.py:100 #: terminal/models/session/session.py:47 tickets/models/comment.py:32 @@ -1185,7 +1189,7 @@ msgstr "用户名与用户相同" #: assets/models/_user.py:52 authentication/models/connection_token.py:39 #: authentication/serializers/connect_token_secret.py:111 -#: terminal/models/applet/applet.py:35 terminal/serializers/session.py:20 +#: terminal/models/applet/applet.py:40 terminal/serializers/session.py:20 #: terminal/serializers/session.py:41 terminal/serializers/storage.py:68 msgid "Protocol" msgstr "协议" @@ -1239,7 +1243,7 @@ msgid "Cloud" msgstr "云服务" #: assets/models/asset/common.py:92 assets/models/platform.py:14 -#: settings/serializers/auth/radius.py:17 settings/serializers/auth/sms.py:69 +#: settings/serializers/auth/radius.py:17 settings/serializers/auth/sms.py:68 #: xpack/plugins/cloud/serializers/account_attrs.py:73 msgid "Port" msgstr "端口" @@ -1251,7 +1255,7 @@ msgstr "地址" #: assets/models/asset/common.py:151 assets/models/platform.py:112 #: authentication/serializers/connect_token_secret.py:115 #: perms/serializers/user_permission.py:24 -#: xpack/plugins/cloud/serializers/account_attrs.py:196 +#: xpack/plugins/cloud/serializers/account_attrs.py:187 msgid "Platform" msgstr "系统平台" @@ -1332,7 +1336,7 @@ msgid "Submit selector" msgstr "确认按钮选择器" #: assets/models/automations/base.py:22 ops/models/job.py:187 -#: settings/serializers/auth/sms.py:100 +#: settings/serializers/auth/sms.py:99 msgid "Parameters" msgstr "参数" @@ -1344,9 +1348,9 @@ msgstr "自动化任务" msgid "Asset automation task" msgstr "资产自动化任务" -#: assets/models/automations/base.py:113 audits/models.py:177 +#: assets/models/automations/base.py:113 audits/models.py:199 #: audits/serializers.py:49 ops/models/base.py:49 ops/models/job.py:184 -#: terminal/models/applet/applet.py:236 terminal/models/applet/host.py:136 +#: terminal/models/applet/applet.py:241 terminal/models/applet/host.py:136 #: terminal/models/component/status.py:30 terminal/serializers/applet.py:18 #: terminal/serializers/applet_host.py:103 tickets/models/ticket/general.py:283 #: tickets/serializers/super_ticket.py:13 @@ -1490,7 +1494,7 @@ msgstr "开放的" msgid "Setting" msgstr "设置" -#: assets/models/platform.py:31 audits/const.py:47 settings/models.py:37 +#: assets/models/platform.py:31 audits/const.py:48 settings/models.py:37 #: terminal/serializers/applet_host.py:29 msgid "Enabled" msgstr "启用" @@ -1715,10 +1719,6 @@ msgstr "值" msgid "Can't contains: /" msgstr "不能包含: /" -#: assets/serializers/node.py:41 -msgid "The same level node name cannot be the same" -msgstr "同级别节点名字不能重复" - #: assets/serializers/platform.py:26 msgid "SFTP enabled" msgstr "SFTP 已启用" @@ -1849,7 +1849,7 @@ msgstr "创建目录" msgid "Rmdir" msgstr "删除目录" -#: audits/const.py:14 audits/const.py:24 +#: audits/const.py:14 audits/const.py:25 #: authentication/templates/authentication/_access_key_modal.html:65 #: perms/const.py:17 rbac/tree.py:230 msgid "Delete" @@ -1871,54 +1871,60 @@ msgstr "建立软链接" msgid "Download" msgstr "下载" -#: audits/const.py:22 rbac/tree.py:228 +#: audits/const.py:19 +#, fuzzy +#| msgid "Rename attr" +msgid "Rename dir" +msgstr "映射属性" + +#: audits/const.py:23 rbac/tree.py:228 msgid "View" msgstr "查看" -#: audits/const.py:25 +#: audits/const.py:26 #: authentication/templates/authentication/_access_key_modal.html:22 #: rbac/tree.py:227 msgid "Create" msgstr "创建" -#: audits/const.py:27 perms/const.py:12 +#: audits/const.py:28 perms/const.py:12 msgid "Connect" msgstr "连接" -#: audits/const.py:28 authentication/templates/authentication/login.html:240 +#: audits/const.py:29 authentication/templates/authentication/login.html:240 #: authentication/templates/authentication/login.html:313 #: templates/_header_bar.html:89 msgid "Login" msgstr "登录" -#: audits/const.py:29 ops/const.py:9 +#: audits/const.py:30 ops/const.py:9 msgid "Change password" msgstr "改密" -#: audits/const.py:34 settings/serializers/terminal.py:6 -#: terminal/models/applet/host.py:25 terminal/models/component/terminal.py:162 +#: audits/const.py:35 settings/serializers/terminal.py:6 +#: terminal/models/applet/host.py:25 terminal/models/component/terminal.py:163 #: terminal/serializers/session.py:48 msgid "Terminal" msgstr "终端" -#: audits/const.py:39 audits/models.py:105 +#: audits/const.py:40 audits/models.py:127 msgid "Operate log" msgstr "操作日志" -#: audits/const.py:40 +#: audits/const.py:41 msgid "Session log" msgstr "会话日志" -#: audits/const.py:41 +#: audits/const.py:42 msgid "Login log" msgstr "登录日志" -#: audits/const.py:42 terminal/models/applet/host.py:140 +#: audits/const.py:43 terminal/models/applet/host.py:140 #: terminal/models/component/task.py:24 msgid "Task" msgstr "任务" -#: audits/const.py:48 +#: audits/const.py:49 msgid "-" msgstr "-" @@ -1930,99 +1936,111 @@ msgstr "是" msgid "No" msgstr "否" -#: audits/models.py:39 +#: audits/models.py:42 msgid "Job audit log" msgstr "作业审计日志" -#: audits/models.py:46 audits/models.py:73 audits/models.py:144 +#: audits/models.py:51 audits/models.py:95 audits/models.py:166 #: terminal/models/session/session.py:39 terminal/models/session/sharing.py:99 msgid "Remote addr" msgstr "远端地址" -#: audits/models.py:51 audits/serializers.py:33 +#: audits/models.py:56 audits/serializers.py:33 msgid "Operate" msgstr "操作" -#: audits/models.py:53 +#: audits/models.py:58 msgid "Filename" msgstr "文件名" -#: audits/models.py:58 +#: audits/models.py:61 +msgid "File Record" +msgstr "" + +#: audits/models.py:62 terminal/backends/command/models.py:24 +#: terminal/models/session/replay.py:9 terminal/models/session/sharing.py:18 +#: terminal/models/session/sharing.py:81 +#: terminal/templates/terminal/_msg_command_alert.html:10 +#: tickets/models/ticket/command_confirm.py:15 +msgid "Session" +msgstr "会话" + +#: audits/models.py:65 msgid "File transfer log" msgstr "文件管理" -#: audits/models.py:67 audits/serializers.py:84 +#: audits/models.py:89 audits/serializers.py:84 msgid "Resource Type" msgstr "资源类型" -#: audits/models.py:68 audits/models.py:71 audits/models.py:117 +#: audits/models.py:90 audits/models.py:93 audits/models.py:139 #: audits/serializers.py:83 msgid "Resource" msgstr "资源" -#: audits/models.py:74 audits/models.py:120 audits/models.py:146 +#: audits/models.py:96 audits/models.py:142 audits/models.py:168 #: terminal/serializers/command.py:50 msgid "Datetime" msgstr "日期" -#: audits/models.py:113 +#: audits/models.py:135 msgid "Activity type" msgstr "活动类型" -#: audits/models.py:123 +#: audits/models.py:145 msgid "Detail" msgstr "详情" -#: audits/models.py:126 +#: audits/models.py:148 msgid "Detail ID" msgstr "详情 ID" -#: audits/models.py:130 +#: audits/models.py:152 msgid "Activity log" msgstr "活动日志" -#: audits/models.py:142 +#: audits/models.py:164 msgid "Change by" msgstr "修改者" -#: audits/models.py:152 +#: audits/models.py:174 msgid "Password change log" msgstr "改密日志" -#: audits/models.py:159 +#: audits/models.py:181 msgid "Login type" msgstr "登录方式" -#: audits/models.py:161 tickets/models/ticket/login_confirm.py:10 +#: audits/models.py:183 tickets/models/ticket/login_confirm.py:10 msgid "Login IP" msgstr "登录 IP" -#: audits/models.py:163 +#: audits/models.py:185 #: authentication/templates/authentication/_msg_different_city.html:11 #: tickets/models/ticket/login_confirm.py:11 msgid "Login city" msgstr "登录城市" -#: audits/models.py:166 audits/serializers.py:63 +#: audits/models.py:188 audits/serializers.py:63 msgid "User agent" msgstr "用户代理" -#: audits/models.py:169 audits/serializers.py:47 +#: audits/models.py:191 audits/serializers.py:47 #: authentication/templates/authentication/_mfa_confirm_modal.html:14 #: users/forms/profile.py:65 users/models/user.py:776 #: users/serializers/profile.py:126 msgid "MFA" msgstr "MFA" -#: audits/models.py:179 +#: audits/models.py:201 msgid "Date login" msgstr "登录日期" -#: audits/models.py:181 audits/serializers.py:65 +#: audits/models.py:203 audits/serializers.py:65 msgid "Authentication backend" msgstr "认证方式" -#: audits/models.py:225 +#: audits/models.py:247 msgid "User login log" msgstr "用户登录日志" @@ -2089,10 +2107,16 @@ msgstr "钉钉" msgid "Temporary token" msgstr "临时密码" -#: audits/tasks.py:90 +#: audits/tasks.py:101 msgid "Clean audits session task log" msgstr "清理审计会话任务日志" +#: audits/tasks.py:114 +#, fuzzy +#| msgid "Upload session replay to external storage" +msgid "Upload FTP file to external storage" +msgstr "上传会话录像到外部存储" + #: authentication/api/confirm.py:40 msgid "This action require verify your MFA" msgstr "该操作需要验证您的 MFA, 请先开启并配置" @@ -2495,55 +2519,61 @@ msgid "Connect method" msgstr "连接方式" #: authentication/models/connection_token.py:41 +#, fuzzy +#| msgid "Connections" +msgid "Connect options" +msgstr "连接数" + +#: authentication/models/connection_token.py:42 #: rbac/serializers/rolebinding.py:21 msgid "User display" msgstr "用户名称" -#: authentication/models/connection_token.py:42 +#: authentication/models/connection_token.py:43 msgid "Asset display" msgstr "资产名称" -#: authentication/models/connection_token.py:43 +#: authentication/models/connection_token.py:44 msgid "Reusable" msgstr "可以重复使用" -#: authentication/models/connection_token.py:44 +#: authentication/models/connection_token.py:45 #: authentication/models/temp_token.py:13 perms/models/asset_permission.py:74 #: tickets/models/ticket/apply_application.py:31 #: tickets/models/ticket/apply_asset.py:20 users/models/user.py:797 msgid "Date expired" msgstr "失效日期" -#: authentication/models/connection_token.py:48 +#: authentication/models/connection_token.py:49 #: perms/models/asset_permission.py:77 msgid "From ticket" msgstr "来自工单" -#: authentication/models/connection_token.py:54 +#: authentication/models/connection_token.py:55 msgid "Connection token" msgstr "连接令牌" -#: authentication/models/connection_token.py:56 +#: authentication/models/connection_token.py:57 msgid "Can view connection token secret" msgstr "可以查看连接令牌密文" -#: authentication/models/connection_token.py:103 +#: authentication/models/connection_token.py:104 msgid "Connection token inactive" msgstr "连接令牌未激活" -#: authentication/models/connection_token.py:106 +#: authentication/models/connection_token.py:107 msgid "Connection token expired at: {}" msgstr "连接令牌过期: {}" -#: authentication/models/connection_token.py:109 +#: authentication/models/connection_token.py:110 msgid "No user or invalid user" msgstr "没有用户或用户失效" -#: authentication/models/connection_token.py:112 +#: authentication/models/connection_token.py:113 msgid "No asset or inactive asset" msgstr "没有资产或资产未激活" -#: authentication/models/connection_token.py:264 +#: authentication/models/connection_token.py:265 msgid "Super connection token" msgstr "超级连接令牌" @@ -3057,26 +3087,26 @@ msgstr "编码数据为 text" msgid "Encrypt field using Secret Key" msgstr "加密的字段" -#: common/db/fields.py:535 +#: common/db/fields.py:539 msgid "" "Invalid JSON data for JSONManyToManyField, should be like {'type': 'all'} or " "{'type': 'ids', 'ids': []} or {'type': 'attrs', 'attrs': [{'name': 'ip', " "'match': 'exact', 'value': '1.1.1.1'}}" msgstr "" -#: common/db/fields.py:542 +#: common/db/fields.py:546 msgid "Invalid type, should be \"all\", \"ids\" or \"attrs\"" msgstr "无效类型,应为 all、ids 或 attrs" -#: common/db/fields.py:545 +#: common/db/fields.py:549 msgid "Invalid ids for ids, should be a list" msgstr "无效的ID,应为列表" -#: common/db/fields.py:548 common/db/fields.py:551 +#: common/db/fields.py:552 common/db/fields.py:555 msgid "Invalid attrs, should be a list of dict" msgstr "无效的属性,应为dict列表" -#: common/db/fields.py:553 +#: common/db/fields.py:557 msgid "Invalid attrs, should be has name and value" msgstr "无效属性,应具有名称和值" @@ -3742,7 +3772,7 @@ msgstr "组织" msgid "Org name" msgstr "组织名称" -#: orgs/models.py:70 rbac/models/role.py:36 terminal/models/applet/applet.py:34 +#: orgs/models.py:70 rbac/models/role.py:36 terminal/models/applet/applet.py:39 msgid "Builtin" msgstr "内置的" @@ -3986,7 +4016,7 @@ msgstr "权限" msgid "Users amount" msgstr "用户数量" -#: rbac/serializers/role.py:28 terminal/models/applet/applet.py:29 +#: rbac/serializers/role.py:28 terminal/models/applet/applet.py:33 msgid "Display name" msgstr "显示名称" @@ -4050,8 +4080,8 @@ msgstr "任务中心" msgid "My assets" msgstr "我的资产" -#: rbac/tree.py:56 terminal/models/applet/applet.py:45 -#: terminal/models/applet/applet.py:233 terminal/models/applet/host.py:28 +#: rbac/tree.py:56 terminal/models/applet/applet.py:50 +#: terminal/models/applet/applet.py:238 terminal/models/applet/host.py:28 #: terminal/serializers/applet.py:15 msgid "Applet" msgstr "远程应用" @@ -4478,46 +4508,46 @@ msgstr "启用 SMS" msgid "SMS provider / Protocol" msgstr "短信服务商 / 协议" -#: settings/serializers/auth/sms.py:23 settings/serializers/auth/sms.py:46 -#: settings/serializers/auth/sms.py:54 settings/serializers/auth/sms.py:63 -#: settings/serializers/auth/sms.py:74 settings/serializers/email.py:69 +#: settings/serializers/auth/sms.py:23 settings/serializers/auth/sms.py:45 +#: settings/serializers/auth/sms.py:53 settings/serializers/auth/sms.py:62 +#: settings/serializers/auth/sms.py:73 settings/serializers/email.py:69 msgid "Signature" msgstr "签名" -#: settings/serializers/auth/sms.py:24 settings/serializers/auth/sms.py:47 -#: settings/serializers/auth/sms.py:55 settings/serializers/auth/sms.py:64 +#: settings/serializers/auth/sms.py:24 settings/serializers/auth/sms.py:46 +#: settings/serializers/auth/sms.py:54 settings/serializers/auth/sms.py:63 msgid "Template code" msgstr "模板" -#: settings/serializers/auth/sms.py:32 +#: settings/serializers/auth/sms.py:31 msgid "Test phone" msgstr "测试手机号" -#: settings/serializers/auth/sms.py:61 +#: settings/serializers/auth/sms.py:60 msgid "App Access Address" msgstr "应用地址" -#: settings/serializers/auth/sms.py:62 +#: settings/serializers/auth/sms.py:61 msgid "Signature channel number" msgstr "签名通道号" -#: settings/serializers/auth/sms.py:70 +#: settings/serializers/auth/sms.py:69 msgid "Enterprise code(SP id)" msgstr "企业代码(SP id)" -#: settings/serializers/auth/sms.py:71 +#: settings/serializers/auth/sms.py:70 msgid "Shared secret(Shared secret)" msgstr "共享密码(Shared secret)" -#: settings/serializers/auth/sms.py:72 +#: settings/serializers/auth/sms.py:71 msgid "Original number(Src id)" msgstr "原始号码(Src id)" -#: settings/serializers/auth/sms.py:73 +#: settings/serializers/auth/sms.py:72 msgid "Business type(Service id)" msgstr "业务类型(Service id)" -#: settings/serializers/auth/sms.py:77 +#: settings/serializers/auth/sms.py:76 #, python-brace-format msgid "" "Template need contain {code} and Signature + template length does not exceed " @@ -4527,24 +4557,24 @@ msgstr "" "模板需要包含 {code},并且模板+签名长度不能超过67个字。例如, 您的验证码是 " "{code}, 有效期为5分钟。请不要泄露给其他人。" -#: settings/serializers/auth/sms.py:86 +#: settings/serializers/auth/sms.py:85 #, python-brace-format msgid "The template needs to contain {code}" msgstr "模板需要包含 {code}" -#: settings/serializers/auth/sms.py:89 +#: settings/serializers/auth/sms.py:88 msgid "Signature + Template must not exceed 65 words" msgstr "模板+签名不能超过65个字" -#: settings/serializers/auth/sms.py:98 +#: settings/serializers/auth/sms.py:97 msgid "URL" msgstr "" -#: settings/serializers/auth/sms.py:103 +#: settings/serializers/auth/sms.py:102 msgid "Request method" msgstr "请求方式" -#: settings/serializers/auth/sms.py:112 +#: settings/serializers/auth/sms.py:111 #, python-format msgid "The value in the parameter must contain %s" msgstr "参数中的值必须包含 %s" @@ -4562,7 +4592,7 @@ msgid "SSO auth key TTL" msgstr "令牌有效期" #: settings/serializers/auth/sso.py:17 -#: xpack/plugins/cloud/serializers/account_attrs.py:193 +#: xpack/plugins/cloud/serializers/account_attrs.py:184 msgid "Unit: second" msgstr "单位: 秒" @@ -5466,7 +5496,7 @@ msgstr "命令存储" msgid "Invalid" msgstr "无效" -#: terminal/api/component/storage.py:119 terminal/tasks.py:139 +#: terminal/api/component/storage.py:119 terminal/tasks.py:140 msgid "Test failure: {}" msgstr "测试失败: {}" @@ -5475,7 +5505,7 @@ msgid "Test successful" msgstr "测试成功" #: terminal/api/component/storage.py:124 terminal/notifications.py:179 -#: terminal/tasks.py:143 +#: terminal/tasks.py:144 msgid "Test failure: Account invalid" msgstr "测试失败: 账号无效" @@ -5519,20 +5549,11 @@ msgstr "输入" msgid "Output" msgstr "输出" -#: terminal/backends/command/models.py:24 terminal/models/session/replay.py:9 -#: terminal/models/session/sharing.py:18 terminal/models/session/sharing.py:81 -#: terminal/templates/terminal/_msg_command_alert.html:10 -#: tickets/models/ticket/command_confirm.py:15 -msgid "Session" -msgstr "会话" - #: terminal/backends/command/models.py:27 terminal/serializers/command.py:22 msgid "Risk level" msgstr "风险等级" -#: terminal/connect_methods.py:54 terminal/connect_methods.py:55 -#: terminal/connect_methods.py:56 terminal/connect_methods.py:57 -#: terminal/connect_methods.py:58 +#: terminal/connect_methods.py:55 msgid "DB Client" msgstr "数据库客户端" @@ -5577,39 +5598,51 @@ msgstr "不支持批量创建" msgid "Storage is invalid" msgstr "存储无效" -#: terminal/models/applet/applet.py:31 +#: terminal/models/applet/applet.py:29 +msgid "Community" +msgstr "社区版" + +#: terminal/models/applet/applet.py:30 +msgid "Enterprise" +msgstr "企业版" + +#: terminal/models/applet/applet.py:35 msgid "Author" msgstr "作者" #: terminal/models/applet/applet.py:36 +msgid "Edition" +msgstr "版本" + +#: terminal/models/applet/applet.py:41 msgid "Can concurrent" msgstr "可以并发" -#: terminal/models/applet/applet.py:37 +#: terminal/models/applet/applet.py:42 msgid "Tags" msgstr "标签" -#: terminal/models/applet/applet.py:41 terminal/serializers/storage.py:157 +#: terminal/models/applet/applet.py:46 terminal/serializers/storage.py:157 msgid "Hosts" msgstr "主机" -#: terminal/models/applet/applet.py:86 +#: terminal/models/applet/applet.py:91 msgid "Applet pkg not valid, Missing file {}" msgstr "Applet pkg 无效,缺少文件 {}" -#: terminal/models/applet/applet.py:105 +#: terminal/models/applet/applet.py:110 msgid "Load platform.yml failed: {}" msgstr "" -#: terminal/models/applet/applet.py:108 +#: terminal/models/applet/applet.py:113 msgid "Only support custom platform" msgstr "" -#: terminal/models/applet/applet.py:113 +#: terminal/models/applet/applet.py:118 msgid "Missing type in platform.yml" msgstr "" -#: terminal/models/applet/applet.py:235 terminal/models/applet/host.py:34 +#: terminal/models/applet/applet.py:240 terminal/models/applet/host.py:34 #: terminal/models/applet/host.py:134 msgid "Hosting" msgstr "宿主机" @@ -5736,7 +5769,7 @@ msgstr "远端地址" msgid "Application User" msgstr "应用用户" -#: terminal/models/component/terminal.py:164 +#: terminal/models/component/terminal.py:165 msgid "Can view terminal config" msgstr "可以查看终端配置" @@ -6100,19 +6133,19 @@ msgstr "清除离线会话" msgid "Upload session replay to external storage" msgstr "上传会话录像到外部存储" -#: terminal/tasks.py:89 +#: terminal/tasks.py:90 msgid "Run applet host deployment" msgstr "运行应用机部署" -#: terminal/tasks.py:99 +#: terminal/tasks.py:100 msgid "Install applet" msgstr "安装应用" -#: terminal/tasks.py:109 +#: terminal/tasks.py:110 msgid "Generate applet host accounts" msgstr "收集远程应用上的账号" -#: terminal/tasks.py:121 +#: terminal/tasks.py:122 msgid "Check command replay storage connectivity" msgstr "检查命令及录像存储可连接性 " @@ -7172,7 +7205,7 @@ msgstr "云账号" msgid "Test cloud account" msgstr "测试云账号" -#: xpack/plugins/cloud/models.py:88 xpack/plugins/cloud/serializers/task.py:36 +#: xpack/plugins/cloud/models.py:88 xpack/plugins/cloud/serializers/task.py:37 msgid "Regions" msgstr "地域" @@ -7180,15 +7213,15 @@ msgstr "地域" msgid "Hostname strategy" msgstr "主机名策略" -#: xpack/plugins/cloud/models.py:102 xpack/plugins/cloud/serializers/task.py:39 +#: xpack/plugins/cloud/models.py:102 xpack/plugins/cloud/serializers/task.py:40 msgid "IP network segment group" msgstr "IP网段组" -#: xpack/plugins/cloud/models.py:105 xpack/plugins/cloud/serializers/task.py:44 +#: xpack/plugins/cloud/models.py:105 xpack/plugins/cloud/serializers/task.py:45 msgid "Sync IP type" msgstr "同步IP类型" -#: xpack/plugins/cloud/models.py:108 xpack/plugins/cloud/serializers/task.py:61 +#: xpack/plugins/cloud/models.py:108 xpack/plugins/cloud/serializers/task.py:62 msgid "Always update" msgstr "总是更新" @@ -7473,11 +7506,15 @@ msgstr "JSON 格式的文件" msgid "IP address invalid `{}`, {}" msgstr "IP 地址无效: `{}`, {}" -#: xpack/plugins/cloud/serializers/account_attrs.py:172 -msgid "Such as: 192.168.1.0/24, 10.0.0.0-10.0.0.255" +#: xpack/plugins/cloud/serializers/account_attrs.py:162 +#, fuzzy +#| msgid "Such as: 192.168.1.0/24, 10.0.0.0-10.0.0.255" +msgid "" +"Format for comma-delimited string,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:175 +#: xpack/plugins/cloud/serializers/account_attrs.py:166 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 " @@ -7486,39 +7523,46 @@ msgstr "" "端口用来检测 IP 地址的有效性,在同步任务执行时,只会同步有效的 IP 地址。
" "如果端口为 0,则表示所有 IP 地址均有效。" -#: xpack/plugins/cloud/serializers/account_attrs.py:183 +#: xpack/plugins/cloud/serializers/account_attrs.py:174 msgid "Hostname prefix" msgstr "主机名前缀" -#: xpack/plugins/cloud/serializers/account_attrs.py:186 +#: xpack/plugins/cloud/serializers/account_attrs.py:177 msgid "IP segment" msgstr "IP 网段" -#: xpack/plugins/cloud/serializers/account_attrs.py:190 +#: xpack/plugins/cloud/serializers/account_attrs.py:181 msgid "Test port" msgstr "测试端口" -#: xpack/plugins/cloud/serializers/account_attrs.py:193 +#: xpack/plugins/cloud/serializers/account_attrs.py:184 msgid "Test timeout" msgstr "测试超时时间" #: xpack/plugins/cloud/serializers/task.py:28 +#, fuzzy +#| msgid "" +#| "Only instances matching the IP range will be synced.
If the instance " +#| "contains multiple IP addresses, the first IP address that matches will be " +#| "used as the IP for the created asset.
The default value of * means " +#| "sync all instances and randomly match IP addresses.
Such as: " +#| "192.168.1.0/24, 10.1.1.1-10.1.1.20" msgid "" "Only instances matching the IP range will be synced.
If the instance " "contains multiple IP addresses, the first IP address that matches will be " "used as the IP for the created asset.
The default value of * means sync " -"all instances and randomly match IP addresses.
Such as: 192.168.1.0/24, " -"10.1.1.1-10.1.1.20" +"all instances and randomly match IP addresses.
Format for comma-" +"delimited string, Such as: 192.168.1.0/24, 10.1.1.1-10.1.1.20" msgstr "" "只有匹配到 IP 段的实例会被同步。
如果实例包含多个 IP 地址,那么第一个匹配" "到的 IP 地址将被用作创建的资产的 IP。
默认值 * 表示同步所有实例和随机匹配 " "IP 地址。
例如: 192.168.1.0/24,10.1.1.1-10.1.1.20" -#: xpack/plugins/cloud/serializers/task.py:34 +#: xpack/plugins/cloud/serializers/task.py:35 msgid "History count" msgstr "执行次数" -#: xpack/plugins/cloud/serializers/task.py:35 +#: xpack/plugins/cloud/serializers/task.py:36 msgid "Instance count" msgstr "实例个数" @@ -7578,22 +7622,25 @@ msgstr "许可证导入成功" msgid "License is invalid" msgstr "无效的许可证" -#: xpack/plugins/license/meta.py:11 xpack/plugins/license/models.py:138 +#: xpack/plugins/license/meta.py:11 xpack/plugins/license/models.py:135 msgid "License" msgstr "许可证" -#: xpack/plugins/license/models.py:80 +#: xpack/plugins/license/models.py:79 msgid "Standard edition" msgstr "标准版" -#: xpack/plugins/license/models.py:82 +#: xpack/plugins/license/models.py:81 msgid "Enterprise edition" msgstr "企业版" -#: xpack/plugins/license/models.py:84 +#: xpack/plugins/license/models.py:83 msgid "Ultimate edition" msgstr "旗舰版" -#: xpack/plugins/license/models.py:86 +#: xpack/plugins/license/models.py:85 msgid "Community edition" msgstr "社区版" + +#~ msgid "Reviewers amount" +#~ msgstr "审批人数量" diff --git a/apps/terminal/migrations/0062_applet_edition.py b/apps/terminal/migrations/0062_applet_edition.py new file mode 100644 index 000000000..1b1c0471e --- /dev/null +++ b/apps/terminal/migrations/0062_applet_edition.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.17 on 2023-06-09 02:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('terminal', '0061_applet_can_concurrent'), + ] + + operations = [ + migrations.AddField( + model_name='applet', + name='edition', + field=models.CharField(default='community', max_length=128, verbose_name='Edition'), + ), + ] diff --git a/apps/terminal/models/applet/applet.py b/apps/terminal/models/applet/applet.py index bd9543f40..86c21f7e5 100644 --- a/apps/terminal/models/applet/applet.py +++ b/apps/terminal/models/applet/applet.py @@ -25,10 +25,16 @@ class Applet(JMSBaseModel): general = 'general', _('General') web = 'web', _('Web') + class Edition(models.TextChoices): + community = 'community', _('Community') + enterprise = 'enterprise', _('Enterprise') + name = models.SlugField(max_length=128, verbose_name=_('Name'), unique=True) display_name = models.CharField(max_length=128, verbose_name=_('Display name')) version = models.CharField(max_length=16, verbose_name=_('Version')) author = models.CharField(max_length=128, verbose_name=_('Author')) + edition = models.CharField(max_length=128, choices=Edition.choices, default=Edition.community, + verbose_name=_('Edition')) type = models.CharField(max_length=16, verbose_name=_('Type'), default='general', choices=Type.choices) is_active = models.BooleanField(default=True, verbose_name=_('Is active')) builtin = models.BooleanField(default=False, verbose_name=_('Builtin')) diff --git a/apps/terminal/serializers/applet.py b/apps/terminal/serializers/applet.py index 3e656747f..79427b4b6 100644 --- a/apps/terminal/serializers/applet.py +++ b/apps/terminal/serializers/applet.py @@ -27,6 +27,7 @@ class AppletPublicationSerializer(serializers.ModelSerializer): class AppletSerializer(serializers.ModelSerializer): icon = serializers.ReadOnlyField(label=_("Icon")) type = LabeledChoiceField(choices=Applet.Type.choices, label=_("Type")) + edition = LabeledChoiceField(choices=Applet.Edition.choices, label=_("Edition")) class Meta: model = Applet @@ -35,6 +36,6 @@ class AppletSerializer(serializers.ModelSerializer): 'icon', 'readme', 'date_created', 'date_updated', ] fields = fields_mini + [ - 'version', 'author', 'type', 'protocols', - 'tags', 'comment' + 'version', 'author', 'type', 'edition', + 'can_concurrent', 'protocols', 'tags', 'comment', ] + read_only_fields From a86378601a04b85bd38415a64894bb6c07dfd2fa Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 9 Jun 2023 15:58:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E6=8F=92?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../content_script.js | 47 ++++++++++++++++--- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js b/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js index d1a6bf8ea..b09cb7531 100644 --- a/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js +++ b/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js @@ -1,13 +1,31 @@ // content_script.js -// 获取所有的 标签元素 -const links = document.getElementsByTagName('a'); +// 创建一个 Mutation Observer 实例 +const observer = new MutationObserver(function (mutationsList) { + // 遍历每个发生变化的 mutation + for (let mutation of mutationsList) { + // 检查是否有节点添加 + if (mutation.type === 'childList') { + // 获取所有的 标签元素 + const links = document.getElementsByTagName('a'); -// 遍历 标签元素并修改链接属性 -for (let i = 0; i < links.length; i++) { - links[i].target = '_self'; // 将 target 属性设置为 _self,当前窗口打开 -} + // 遍历 标签元素并修改链接属性 + console.log("开始替换标签") + for (let i = 0; i < links.length; i++) { + links[i].target = '_self'; // 将 target 属性设置为 _self,当前窗口打开 + } + // 停止监听,已经完成替换操作 + observer.disconnect(); + + // 退出循环,不再处理后续的 mutations + break; + } + } +}); + +// 开始观察 document.body 的子节点变化 +observer.observe(document.body, {childList: true, subtree: true}); chrome.runtime.onMessage.addListener( function (request, sender, sendResponse) { @@ -18,7 +36,7 @@ chrome.runtime.onMessage.addListener( ) document.addEventListener("contextmenu", function (event) { - console.log('On contextmenu event') + console.log('On context') event.preventDefault(); }); @@ -31,6 +49,21 @@ window.addEventListener("keydown", function (e) { } }, true); +// 保存原始的 window.open 函数引用 +var originalOpen = window.open; + +// 修改 window.open 函数 +window.open = function (url, target, features) { + // 将 target 强制设置为 "_self",使得新页面在当前标签页中打开 + target = "_self"; + + // 修改当前页面的 URL + location.href = url; + + // 调用原始的 window.open 函数 + return originalOpen.call(this, url, target, features); +}; + chrome.runtime.sendMessage({greeting: "hello"}, function (response) { });