per: gather account perm (#9723)

Co-authored-by: feng <1304903146@qq.com>
Co-authored-by: feng626 <57284900+feng626@users.noreply.github.com>
pull/9724/head
fit2bot 2023-02-23 18:08:56 +08:00 committed by GitHub
parent aa81db57b1
commit 9f8900041d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 205 additions and 182 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 3.2.16 on 2023-02-23 09:59
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0007_alter_account_options'),
]
operations = [
migrations.AlterModelOptions(
name='gatheredaccount',
options={'ordering': ['asset'], 'verbose_name': 'Gather account automation'},
),
]

View File

@ -1,10 +1,8 @@
from django.utils.translation import ugettext_lazy as _
from django.db import models
from django.utils.translation import ugettext_lazy as _
from orgs.mixins.models import JMSOrgBaseModel
from accounts.const import AutomationTypes
from orgs.mixins.models import JMSOrgBaseModel
from .base import AccountBaseAutomation
__all__ = ['GatherAccountsAutomation', 'GatheredAccount']
@ -22,7 +20,7 @@ class GatheredAccount(JMSOrgBaseModel):
return self.asset.address
class Meta:
verbose_name = _('Gather account')
verbose_name = _('Gather account automation')
unique_together = [
('username', 'asset'),
]

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:af57d16430705feb02ebbb99fc3a2f5fc3bab69209f558aa4d69b1e8055a6f5f
size 136036
oid sha256:fa23550c6fd74b0f0e586990eb5eb54f2717db9f2e6b0513151d205a34fa2383
size 136199

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-23 16:29+0800\n"
"POT-Creation-Date: 2023-02-23 17:59+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"
@ -70,7 +70,7 @@ msgstr "ローカル"
msgid "Collected"
msgstr ""
#: accounts/const/automation.py:22 rbac/tree.py:51
#: accounts/const/automation.py:22 rbac/tree.py:50
msgid "Push account"
msgstr "アカウントプッシュ"
@ -159,7 +159,7 @@ msgid "Only create"
msgstr "作成のみ"
#: accounts/models/account.py:47
#: accounts/models/automations/gather_account.py:16
#: accounts/models/automations/gather_account.py:14
#: accounts/serializers/account/account.py:95
#: accounts/serializers/account/gathered_account.py:10
#: accounts/serializers/automations/change_secret.py:111
@ -172,7 +172,7 @@ msgstr "作成のみ"
#: perms/models/asset_permission.py:64 perms/serializers/permission.py:27
#: terminal/backends/command/models.py:20 terminal/models/session/session.py:32
#: terminal/notifications.py:95 terminal/serializers/command.py:17
#: tickets/models/ticket/apply_asset.py:16 xpack/plugins/cloud/models.py:220
#: tickets/models/ticket/apply_asset.py:16 xpack/plugins/cloud/models.py:212
msgid "Asset"
msgstr "資産"
@ -276,7 +276,7 @@ msgid "Trigger mode"
msgstr "トリガーモード"
#: accounts/models/automations/backup_account.py:97 audits/models.py:172
#: terminal/models/session/sharing.py:107 xpack/plugins/cloud/models.py:176
#: terminal/models/session/sharing.py:107 xpack/plugins/cloud/models.py:168
msgid "Reason"
msgstr "理由"
@ -385,15 +385,15 @@ msgstr "間違い"
msgid "Change secret record"
msgstr "パスワード レコードの変更"
#: accounts/models/automations/gather_account.py:14
#: accounts/models/automations/gather_account.py:12
msgid "Present"
msgstr "存在する"
#: accounts/models/automations/gather_account.py:15
#: accounts/models/automations/gather_account.py:13
msgid "Date last login"
msgstr "最終ログイン日"
#: accounts/models/automations/gather_account.py:17
#: accounts/models/automations/gather_account.py:15
#: accounts/models/automations/push_account.py:13 accounts/models/base.py:34
#: acls/serializers/base.py:18 acls/serializers/base.py:49
#: assets/models/_user.py:23 audits/models.py:157 authentication/forms.py:25
@ -406,15 +406,15 @@ msgstr "最終ログイン日"
msgid "Username"
msgstr "ユーザー名"
#: accounts/models/automations/gather_account.py:18
#: accounts/models/automations/gather_account.py:16
msgid "Address last login"
msgstr "最終ログインアドレス"
#: accounts/models/automations/gather_account.py:25 rbac/tree.py:50
msgid "Gather account"
msgstr "アカウントを集める"
#: accounts/models/automations/gather_account.py:23
msgid "Gather account automation"
msgstr "自動収集アカウント"
#: accounts/models/automations/gather_account.py:41
#: accounts/models/automations/gather_account.py:39
#: accounts/tasks/gather_accounts.py:29
msgid "Gather asset accounts"
msgstr "アカウントのコレクション"
@ -1072,7 +1072,7 @@ msgstr "SSHパブリックキー"
#: terminal/models/component/endpoint.py:100
#: terminal/models/session/session.py:47 tickets/models/comment.py:32
#: tickets/models/ticket/general.py:297 users/models/user.py:756
#: xpack/plugins/cloud/models.py:35 xpack/plugins/cloud/models.py:119
#: xpack/plugins/cloud/models.py:35 xpack/plugins/cloud/models.py:111
msgid "Comment"
msgstr "コメント"
@ -1183,7 +1183,7 @@ msgstr "アドレス"
#: assets/models/asset/common.py:104 assets/models/platform.py:112
#: authentication/serializers/connect_token_secret.py:108
#: perms/serializers/user_permission.py:23
#: xpack/plugins/cloud/serializers/account_attrs.py:179
#: xpack/plugins/cloud/serializers/account_attrs.py:187
msgid "Platform"
msgstr "プラットフォーム"
@ -1254,7 +1254,7 @@ msgid "Submit selector"
msgstr "ボタンセレクターを確認する"
#: assets/models/automations/base.py:17 assets/models/cmd_filter.py:38
#: assets/serializers/asset/common.py:289 rbac/tree.py:36
#: assets/serializers/asset/common.py:289 rbac/tree.py:35
msgid "Accounts"
msgstr "アカウント"
@ -1272,8 +1272,8 @@ msgstr "アセットの自動化タスク"
#: terminal/models/component/status.py:27 terminal/serializers/applet.py:18
#: terminal/serializers/applet_host.py:93 tickets/models/ticket/general.py:283
#: tickets/serializers/super_ticket.py:13
#: tickets/serializers/ticket/ticket.py:20 xpack/plugins/cloud/models.py:172
#: xpack/plugins/cloud/models.py:224
#: tickets/serializers/ticket/ticket.py:20 xpack/plugins/cloud/models.py:164
#: xpack/plugins/cloud/models.py:216
msgid "Status"
msgstr "ステータス"
@ -1492,8 +1492,7 @@ msgstr "自動充填"
#: assets/serializers/asset/common.py:124 assets/serializers/platform.py:99
#: authentication/serializers/connect_token_secret.py:28
#: authentication/serializers/connect_token_secret.py:66
#: perms/serializers/user_permission.py:24 xpack/plugins/cloud/models.py:107
#: xpack/plugins/cloud/serializers/task.py:38
#: perms/serializers/user_permission.py:24 xpack/plugins/cloud/models.py:99
msgid "Protocols"
msgstr "プロトコル"
@ -1520,6 +1519,8 @@ msgstr "自動情報"
#: assets/serializers/asset/database.py:25 common/serializers/fields.py:100
#: tickets/serializers/ticket/common.py:58
#: xpack/plugins/cloud/serializers/account_attrs.py:56
#: xpack/plugins/cloud/serializers/account_attrs.py:79
#: xpack/plugins/cloud/serializers/account_attrs.py:143
msgid "This field is required."
msgstr "このフィールドは必須です。"
@ -3239,7 +3240,7 @@ msgstr "タスク実行パラメータエラー"
msgid "Unsupported file content"
msgstr "サポートされていないファイルの内容"
#: ops/apps.py:9 ops/notifications.py:16 rbac/tree.py:56
#: ops/apps.py:9 ops/notifications.py:16 rbac/tree.py:55
msgid "App ops"
msgstr "アプリ操作"
@ -3859,59 +3860,63 @@ msgstr "ロール表示"
msgid "Has bound this role"
msgstr "この役割をバインドしました"
#: rbac/tree.py:18 rbac/tree.py:19
#: rbac/tree.py:17 rbac/tree.py:18
msgid "All permissions"
msgstr "すべての権限"
#: rbac/tree.py:25
#: rbac/tree.py:24
msgid "Console view"
msgstr "コンソールビュー"
#: rbac/tree.py:26
#: rbac/tree.py:25
msgid "Workbench view"
msgstr "ワークスペースビュー"
#: rbac/tree.py:27
#: rbac/tree.py:26
msgid "Audit view"
msgstr "監査ビュー"
#: rbac/tree.py:28 settings/models.py:159
#: rbac/tree.py:27 settings/models.py:159
msgid "System setting"
msgstr "システム設定"
#: rbac/tree.py:29
#: rbac/tree.py:28
msgid "Other"
msgstr "その他"
#: rbac/tree.py:38
#: rbac/tree.py:37
msgid "Session audits"
msgstr "セッション監査"
#: rbac/tree.py:48
#: rbac/tree.py:47
msgid "Cloud import"
msgstr "クラウドインポート"
#: rbac/tree.py:49
#: rbac/tree.py:48
msgid "Backup account"
msgstr "バックアップアカウント"
#: rbac/tree.py:52
#: rbac/tree.py:49
msgid "Gather account"
msgstr "アカウントを集める"
#: rbac/tree.py:51
msgid "Asset change auth"
msgstr "資産の改ざん"
#: rbac/tree.py:53
#: rbac/tree.py:52
msgid "Terminal setting"
msgstr "ターミナル設定"
#: rbac/tree.py:54
#: rbac/tree.py:53
msgid "Task Center"
msgstr "タスクセンター"
#: rbac/tree.py:55
#: rbac/tree.py:54
msgid "My assets"
msgstr "私の資産"
#: rbac/tree.py:57 terminal/models/applet/applet.py:43
#: rbac/tree.py:56 terminal/models/applet/applet.py:43
#: terminal/models/applet/applet.py:154 terminal/models/applet/host.py:28
#: terminal/serializers/applet.py:15
msgid "Applet"
@ -4412,7 +4417,7 @@ msgid "SSO auth key TTL"
msgstr "Token有効期間"
#: settings/serializers/auth/sso.py:17
#: xpack/plugins/cloud/serializers/account_attrs.py:176
#: xpack/plugins/cloud/serializers/account_attrs.py:184
msgid "Unit: second"
msgstr "単位: 秒"
@ -5825,7 +5830,7 @@ msgstr "アクセスキー"
msgid "Access key secret"
msgstr "アクセスキーシークレット"
#: terminal/serializers/storage.py:65 xpack/plugins/cloud/models.py:217
#: terminal/serializers/storage.py:65 xpack/plugins/cloud/models.py:209
msgid "Region"
msgstr "リージョン"
@ -6956,59 +6961,47 @@ msgstr "リージョン"
msgid "Hostname strategy"
msgstr "ホスト名戦略"
#: xpack/plugins/cloud/models.py:100
#, fuzzy
#| msgid "Only admin users"
msgid "Unix admin user"
msgstr "管理者のみ"
#: xpack/plugins/cloud/models.py:104
#, fuzzy
#| msgid "Only admin users"
msgid "Windows admin user"
msgstr "管理者のみ"
#: xpack/plugins/cloud/models.py:110 xpack/plugins/cloud/serializers/task.py:41
#: 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:113 xpack/plugins/cloud/serializers/task.py:46
#: xpack/plugins/cloud/models.py:105 xpack/plugins/cloud/serializers/task.py:45
msgid "Sync IP type"
msgstr "同期IPタイプ"
#: xpack/plugins/cloud/models.py:116 xpack/plugins/cloud/serializers/task.py:64
#: xpack/plugins/cloud/models.py:108 xpack/plugins/cloud/serializers/task.py:62
msgid "Always update"
msgstr "常に更新"
#: xpack/plugins/cloud/models.py:122
#: xpack/plugins/cloud/models.py:114
msgid "Date last sync"
msgstr "最終同期日"
#: xpack/plugins/cloud/models.py:127 xpack/plugins/cloud/models.py:168
#: xpack/plugins/cloud/models.py:119 xpack/plugins/cloud/models.py:160
msgid "Sync instance task"
msgstr "インスタンスの同期タスク"
#: xpack/plugins/cloud/models.py:179 xpack/plugins/cloud/models.py:227
#: xpack/plugins/cloud/models.py:171 xpack/plugins/cloud/models.py:219
msgid "Date sync"
msgstr "日付の同期"
#: xpack/plugins/cloud/models.py:183
#: xpack/plugins/cloud/models.py:175
msgid "Sync instance task execution"
msgstr "インスタンスタスクの同期実行"
#: xpack/plugins/cloud/models.py:207
#: xpack/plugins/cloud/models.py:199
msgid "Sync task"
msgstr "同期タスク"
#: xpack/plugins/cloud/models.py:211
#: xpack/plugins/cloud/models.py:203
msgid "Sync instance task history"
msgstr "インスタンスタスク履歴の同期"
#: xpack/plugins/cloud/models.py:214
#: xpack/plugins/cloud/models.py:206
msgid "Instance"
msgstr "インスタンス"
#: xpack/plugins/cloud/models.py:231
#: xpack/plugins/cloud/models.py:223
msgid "Sync instance detail"
msgstr "同期インスタンスの詳細"
@ -7222,52 +7215,52 @@ msgstr "テナントID"
msgid "Subscription ID"
msgstr "サブスクリプションID"
#: xpack/plugins/cloud/serializers/account_attrs.py:95
#: xpack/plugins/cloud/serializers/account_attrs.py:100
#: xpack/plugins/cloud/serializers/account_attrs.py:116
#: xpack/plugins/cloud/serializers/account_attrs.py:141
#: xpack/plugins/cloud/serializers/account_attrs.py:98
#: xpack/plugins/cloud/serializers/account_attrs.py:103
#: xpack/plugins/cloud/serializers/account_attrs.py:119
#: xpack/plugins/cloud/serializers/account_attrs.py:149
msgid "API Endpoint"
msgstr "APIエンドポイント"
#: xpack/plugins/cloud/serializers/account_attrs.py:106
#: xpack/plugins/cloud/serializers/account_attrs.py:109
msgid "Auth url"
msgstr "認証アドレス"
#: xpack/plugins/cloud/serializers/account_attrs.py:107
#: xpack/plugins/cloud/serializers/account_attrs.py:110
msgid "eg: http://openstack.example.com:5000/v3"
msgstr "例えば: http://openstack.example.com:5000/v3"
#: xpack/plugins/cloud/serializers/account_attrs.py:110
#: xpack/plugins/cloud/serializers/account_attrs.py:113
msgid "User domain"
msgstr "ユーザードメイン"
#: xpack/plugins/cloud/serializers/account_attrs.py:117
#: xpack/plugins/cloud/serializers/account_attrs.py:120
msgid "Cert File"
msgstr "証明書ファイル"
#: xpack/plugins/cloud/serializers/account_attrs.py:118
#: xpack/plugins/cloud/serializers/account_attrs.py:121
msgid "Key File"
msgstr "キーファイル"
#: xpack/plugins/cloud/serializers/account_attrs.py:134
#: xpack/plugins/cloud/serializers/account_attrs.py:137
msgid "Service account key"
msgstr "サービスアカウントキー"
#: xpack/plugins/cloud/serializers/account_attrs.py:135
#: xpack/plugins/cloud/serializers/account_attrs.py:138
msgid "The file is in JSON format"
msgstr "ファイルはJSON形式です。"
#: xpack/plugins/cloud/serializers/account_attrs.py:148
#: xpack/plugins/cloud/serializers/account_attrs.py:156
msgid "IP address invalid `{}`, {}"
msgstr "IPアドレスが無効: '{}', {}"
#: xpack/plugins/cloud/serializers/account_attrs.py:154
#: xpack/plugins/cloud/serializers/account_attrs.py:162
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:158
#: 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 "
@ -7277,19 +7270,19 @@ msgstr ""
"実行されると、有効な IP アドレスのみが同期されます。 <br>ポートが0の場合、す"
"べてのIPアドレスが有効です。"
#: xpack/plugins/cloud/serializers/account_attrs.py:166
#: xpack/plugins/cloud/serializers/account_attrs.py:174
msgid "Hostname prefix"
msgstr "ホスト名プレフィックス"
#: xpack/plugins/cloud/serializers/account_attrs.py:169
#: xpack/plugins/cloud/serializers/account_attrs.py:177
msgid "IP segment"
msgstr "IP セグメント"
#: xpack/plugins/cloud/serializers/account_attrs.py:173
#: xpack/plugins/cloud/serializers/account_attrs.py:181
msgid "Test port"
msgstr "テストポート"
#: xpack/plugins/cloud/serializers/account_attrs.py:176
#: xpack/plugins/cloud/serializers/account_attrs.py:184
msgid "Test timeout"
msgstr "テストタイムアウト"
@ -7315,11 +7308,13 @@ msgstr "実行回数"
msgid "Instance count"
msgstr "インスタンス数"
#: xpack/plugins/cloud/serializers/task.py:63
#, fuzzy
#| msgid "Only admin users"
msgid "Linux admin user"
msgstr "管理者のみ"
#: xpack/plugins/cloud/tasks.py:27
msgid "Run sync instance task"
msgstr "同期インスタンス タスクを実行する"
#: xpack/plugins/cloud/tasks.py:41
msgid "Period clean sync instance task execution"
msgstr "同期インスタンス タスクの実行記録を定期的にクリアする"
#: xpack/plugins/cloud/utils.py:69
msgid "Account unavailable"
@ -7389,11 +7384,20 @@ msgstr "究極のエディション"
msgid "Community edition"
msgstr "コミュニティ版"
#~ msgid "Run sync instance task"
#~ msgstr "同期インスタンス タスクを実行する"
#, fuzzy
#~| msgid "Only admin users"
#~ msgid "Unix admin user"
#~ msgstr "管理者のみ"
#~ msgid "Period clean sync instance task execution"
#~ msgstr "同期インスタンス タスクの実行記録を定期的にクリアする"
#, fuzzy
#~| msgid "Only admin users"
#~ msgid "Windows admin user"
#~ msgstr "管理者のみ"
#, fuzzy
#~| msgid "Only admin users"
#~ msgid "Linux admin user"
#~ msgstr "管理者のみ"
#~ msgid "Can push account to asset"
#~ msgstr "アカウントをアセットにプッシュできます"

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e68b83ab7aac5be2b88ed9c64a626b41ebfc035ed733a206e2c0d69fcf21337b
size 111773
oid sha256:a1627f904e2932024a40fe6548e9be4a1d5d4890b7915843b91f6e83b04cc77d
size 111903

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-23 16:29+0800\n"
"POT-Creation-Date: 2023-02-23 17:59+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"
@ -69,7 +69,7 @@ msgstr "数据库"
msgid "Collected"
msgstr "收集"
#: accounts/const/automation.py:22 rbac/tree.py:51
#: accounts/const/automation.py:22 rbac/tree.py:50
msgid "Push account"
msgstr "账号推送"
@ -158,7 +158,7 @@ msgid "Only create"
msgstr "仅创建"
#: accounts/models/account.py:47
#: accounts/models/automations/gather_account.py:16
#: accounts/models/automations/gather_account.py:14
#: accounts/serializers/account/account.py:95
#: accounts/serializers/account/gathered_account.py:10
#: accounts/serializers/automations/change_secret.py:111
@ -171,7 +171,7 @@ msgstr "仅创建"
#: perms/models/asset_permission.py:64 perms/serializers/permission.py:27
#: terminal/backends/command/models.py:20 terminal/models/session/session.py:32
#: terminal/notifications.py:95 terminal/serializers/command.py:17
#: tickets/models/ticket/apply_asset.py:16 xpack/plugins/cloud/models.py:220
#: tickets/models/ticket/apply_asset.py:16 xpack/plugins/cloud/models.py:212
msgid "Asset"
msgstr "资产"
@ -275,7 +275,7 @@ msgid "Trigger mode"
msgstr "触发模式"
#: accounts/models/automations/backup_account.py:97 audits/models.py:172
#: terminal/models/session/sharing.py:107 xpack/plugins/cloud/models.py:176
#: terminal/models/session/sharing.py:107 xpack/plugins/cloud/models.py:168
msgid "Reason"
msgstr "原因"
@ -384,15 +384,15 @@ msgstr "错误"
msgid "Change secret record"
msgstr "改密记录"
#: accounts/models/automations/gather_account.py:14
#: accounts/models/automations/gather_account.py:12
msgid "Present"
msgstr "存在"
#: accounts/models/automations/gather_account.py:15
#: accounts/models/automations/gather_account.py:13
msgid "Date last login"
msgstr "最后登录日期"
#: accounts/models/automations/gather_account.py:17
#: accounts/models/automations/gather_account.py:15
#: accounts/models/automations/push_account.py:13 accounts/models/base.py:34
#: acls/serializers/base.py:18 acls/serializers/base.py:49
#: assets/models/_user.py:23 audits/models.py:157 authentication/forms.py:25
@ -405,15 +405,15 @@ msgstr "最后登录日期"
msgid "Username"
msgstr "用户名"
#: accounts/models/automations/gather_account.py:18
#: accounts/models/automations/gather_account.py:16
msgid "Address last login"
msgstr "最后登录地址"
#: accounts/models/automations/gather_account.py:25 rbac/tree.py:50
msgid "Gather account"
msgstr "收集账号"
#: accounts/models/automations/gather_account.py:23
msgid "Gather account automation"
msgstr "自动化收集账号"
#: accounts/models/automations/gather_account.py:41
#: accounts/models/automations/gather_account.py:39
#: accounts/tasks/gather_accounts.py:29
msgid "Gather asset accounts"
msgstr "收集账号"
@ -1064,7 +1064,7 @@ msgstr "SSH公钥"
#: terminal/models/component/endpoint.py:100
#: terminal/models/session/session.py:47 tickets/models/comment.py:32
#: tickets/models/ticket/general.py:297 users/models/user.py:756
#: xpack/plugins/cloud/models.py:35 xpack/plugins/cloud/models.py:119
#: xpack/plugins/cloud/models.py:35 xpack/plugins/cloud/models.py:111
msgid "Comment"
msgstr "备注"
@ -1175,7 +1175,7 @@ msgstr "地址"
#: assets/models/asset/common.py:104 assets/models/platform.py:112
#: authentication/serializers/connect_token_secret.py:108
#: perms/serializers/user_permission.py:23
#: xpack/plugins/cloud/serializers/account_attrs.py:179
#: xpack/plugins/cloud/serializers/account_attrs.py:187
msgid "Platform"
msgstr "系统平台"
@ -1246,7 +1246,7 @@ msgid "Submit selector"
msgstr "确认按钮选择器"
#: assets/models/automations/base.py:17 assets/models/cmd_filter.py:38
#: assets/serializers/asset/common.py:289 rbac/tree.py:36
#: assets/serializers/asset/common.py:289 rbac/tree.py:35
msgid "Accounts"
msgstr "账号管理"
@ -1264,8 +1264,8 @@ msgstr "资产自动化任务"
#: terminal/models/component/status.py:27 terminal/serializers/applet.py:18
#: terminal/serializers/applet_host.py:93 tickets/models/ticket/general.py:283
#: tickets/serializers/super_ticket.py:13
#: tickets/serializers/ticket/ticket.py:20 xpack/plugins/cloud/models.py:172
#: xpack/plugins/cloud/models.py:224
#: tickets/serializers/ticket/ticket.py:20 xpack/plugins/cloud/models.py:164
#: xpack/plugins/cloud/models.py:216
msgid "Status"
msgstr "状态"
@ -1484,8 +1484,7 @@ msgstr "自动代填"
#: assets/serializers/asset/common.py:124 assets/serializers/platform.py:99
#: authentication/serializers/connect_token_secret.py:28
#: authentication/serializers/connect_token_secret.py:66
#: perms/serializers/user_permission.py:24 xpack/plugins/cloud/models.py:107
#: xpack/plugins/cloud/serializers/task.py:38
#: perms/serializers/user_permission.py:24 xpack/plugins/cloud/models.py:99
msgid "Protocols"
msgstr "协议组"
@ -1512,6 +1511,8 @@ msgstr "自动化信息"
#: assets/serializers/asset/database.py:25 common/serializers/fields.py:100
#: tickets/serializers/ticket/common.py:58
#: xpack/plugins/cloud/serializers/account_attrs.py:56
#: xpack/plugins/cloud/serializers/account_attrs.py:79
#: xpack/plugins/cloud/serializers/account_attrs.py:143
msgid "This field is required."
msgstr "该字段是必填项。"
@ -3204,7 +3205,7 @@ msgstr "任务 {} 执行参数错误"
msgid "Unsupported file content"
msgstr "不支持的文件内容"
#: ops/apps.py:9 ops/notifications.py:16 rbac/tree.py:56
#: ops/apps.py:9 ops/notifications.py:16 rbac/tree.py:55
msgid "App ops"
msgstr "作业中心"
@ -3822,59 +3823,63 @@ msgstr "角色显示"
msgid "Has bound this role"
msgstr "已经绑定"
#: rbac/tree.py:18 rbac/tree.py:19
#: rbac/tree.py:17 rbac/tree.py:18
msgid "All permissions"
msgstr "所有权限"
#: rbac/tree.py:25
#: rbac/tree.py:24
msgid "Console view"
msgstr "控制台"
#: rbac/tree.py:26
#: rbac/tree.py:25
msgid "Workbench view"
msgstr "工作台"
#: rbac/tree.py:27
#: rbac/tree.py:26
msgid "Audit view"
msgstr "审计台"
#: rbac/tree.py:28 settings/models.py:159
#: rbac/tree.py:27 settings/models.py:159
msgid "System setting"
msgstr "系统设置"
#: rbac/tree.py:29
#: rbac/tree.py:28
msgid "Other"
msgstr "其它"
#: rbac/tree.py:38
#: rbac/tree.py:37
msgid "Session audits"
msgstr "会话审计"
#: rbac/tree.py:48
#: rbac/tree.py:47
msgid "Cloud import"
msgstr "云同步"
#: rbac/tree.py:49
#: rbac/tree.py:48
msgid "Backup account"
msgstr "备份账号"
#: rbac/tree.py:52
#: rbac/tree.py:49
msgid "Gather account"
msgstr "收集账号"
#: rbac/tree.py:51
msgid "Asset change auth"
msgstr "资产改密"
#: rbac/tree.py:53
#: rbac/tree.py:52
msgid "Terminal setting"
msgstr "终端设置"
#: rbac/tree.py:54
#: rbac/tree.py:53
msgid "Task Center"
msgstr "任务中心"
#: rbac/tree.py:55
#: rbac/tree.py:54
msgid "My assets"
msgstr "我的资产"
#: rbac/tree.py:57 terminal/models/applet/applet.py:43
#: rbac/tree.py:56 terminal/models/applet/applet.py:43
#: terminal/models/applet/applet.py:154 terminal/models/applet/host.py:28
#: terminal/serializers/applet.py:15
msgid "Applet"
@ -4373,7 +4378,7 @@ msgid "SSO auth key TTL"
msgstr "令牌有效期"
#: settings/serializers/auth/sso.py:17
#: xpack/plugins/cloud/serializers/account_attrs.py:176
#: xpack/plugins/cloud/serializers/account_attrs.py:184
msgid "Unit: second"
msgstr "单位: 秒"
@ -5751,7 +5756,7 @@ msgstr "Access key ID(AK)"
msgid "Access key secret"
msgstr "Access key secret(SK)"
#: terminal/serializers/storage.py:65 xpack/plugins/cloud/models.py:217
#: terminal/serializers/storage.py:65 xpack/plugins/cloud/models.py:209
msgid "Region"
msgstr "地域"
@ -6864,55 +6869,47 @@ msgstr "地域"
msgid "Hostname strategy"
msgstr "主机名策略"
#: xpack/plugins/cloud/models.py:100
msgid "Unix admin user"
msgstr "Unix 管理员"
#: xpack/plugins/cloud/models.py:104
msgid "Windows admin user"
msgstr "Windows 管理员"
#: xpack/plugins/cloud/models.py:110 xpack/plugins/cloud/serializers/task.py:41
#: 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:113 xpack/plugins/cloud/serializers/task.py:46
#: xpack/plugins/cloud/models.py:105 xpack/plugins/cloud/serializers/task.py:45
msgid "Sync IP type"
msgstr "同步IP类型"
#: xpack/plugins/cloud/models.py:116 xpack/plugins/cloud/serializers/task.py:64
#: xpack/plugins/cloud/models.py:108 xpack/plugins/cloud/serializers/task.py:62
msgid "Always update"
msgstr "总是更新"
#: xpack/plugins/cloud/models.py:122
#: xpack/plugins/cloud/models.py:114
msgid "Date last sync"
msgstr "最后同步日期"
#: xpack/plugins/cloud/models.py:127 xpack/plugins/cloud/models.py:168
#: xpack/plugins/cloud/models.py:119 xpack/plugins/cloud/models.py:160
msgid "Sync instance task"
msgstr "同步实例任务"
#: xpack/plugins/cloud/models.py:179 xpack/plugins/cloud/models.py:227
#: xpack/plugins/cloud/models.py:171 xpack/plugins/cloud/models.py:219
msgid "Date sync"
msgstr "同步日期"
#: xpack/plugins/cloud/models.py:183
#: xpack/plugins/cloud/models.py:175
msgid "Sync instance task execution"
msgstr "同步实例任务执行"
#: xpack/plugins/cloud/models.py:207
#: xpack/plugins/cloud/models.py:199
msgid "Sync task"
msgstr "同步任务"
#: xpack/plugins/cloud/models.py:211
#: xpack/plugins/cloud/models.py:203
msgid "Sync instance task history"
msgstr "同步实例任务历史"
#: xpack/plugins/cloud/models.py:214
#: xpack/plugins/cloud/models.py:206
msgid "Instance"
msgstr "实例"
#: xpack/plugins/cloud/models.py:231
#: xpack/plugins/cloud/models.py:223
msgid "Sync instance detail"
msgstr "同步实例详情"
@ -7126,52 +7123,52 @@ msgstr "租户 ID"
msgid "Subscription ID"
msgstr "订阅 ID"
#: xpack/plugins/cloud/serializers/account_attrs.py:95
#: xpack/plugins/cloud/serializers/account_attrs.py:100
#: xpack/plugins/cloud/serializers/account_attrs.py:116
#: xpack/plugins/cloud/serializers/account_attrs.py:141
#: xpack/plugins/cloud/serializers/account_attrs.py:98
#: xpack/plugins/cloud/serializers/account_attrs.py:103
#: xpack/plugins/cloud/serializers/account_attrs.py:119
#: xpack/plugins/cloud/serializers/account_attrs.py:149
msgid "API Endpoint"
msgstr "API 端点"
#: xpack/plugins/cloud/serializers/account_attrs.py:106
#: xpack/plugins/cloud/serializers/account_attrs.py:109
msgid "Auth url"
msgstr "认证地址"
#: xpack/plugins/cloud/serializers/account_attrs.py:107
#: xpack/plugins/cloud/serializers/account_attrs.py:110
msgid "eg: http://openstack.example.com:5000/v3"
msgstr "如: http://openstack.example.com:5000/v3"
#: xpack/plugins/cloud/serializers/account_attrs.py:110
#: xpack/plugins/cloud/serializers/account_attrs.py:113
msgid "User domain"
msgstr "用户域"
#: xpack/plugins/cloud/serializers/account_attrs.py:117
#: xpack/plugins/cloud/serializers/account_attrs.py:120
msgid "Cert File"
msgstr "证书文件"
#: xpack/plugins/cloud/serializers/account_attrs.py:118
#: xpack/plugins/cloud/serializers/account_attrs.py:121
msgid "Key File"
msgstr "密钥文件"
#: xpack/plugins/cloud/serializers/account_attrs.py:134
#: xpack/plugins/cloud/serializers/account_attrs.py:137
msgid "Service account key"
msgstr "服务账号密钥"
#: xpack/plugins/cloud/serializers/account_attrs.py:135
#: xpack/plugins/cloud/serializers/account_attrs.py:138
msgid "The file is in JSON format"
msgstr "JSON 格式的文件"
#: xpack/plugins/cloud/serializers/account_attrs.py:148
#: xpack/plugins/cloud/serializers/account_attrs.py:156
msgid "IP address invalid `{}`, {}"
msgstr "IP 地址无效: `{}`, {}"
#: xpack/plugins/cloud/serializers/account_attrs.py:154
#: xpack/plugins/cloud/serializers/account_attrs.py:162
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:158
#: 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 "
@ -7180,19 +7177,19 @@ msgstr ""
"端口用来检测 IP 地址的有效性,在同步任务执行时,只会同步有效的 IP 地址。 <br>"
"如果端口为 0则表示所有 IP 地址均有效。"
#: xpack/plugins/cloud/serializers/account_attrs.py:166
#: xpack/plugins/cloud/serializers/account_attrs.py:174
msgid "Hostname prefix"
msgstr "主机名前缀"
#: xpack/plugins/cloud/serializers/account_attrs.py:169
#: xpack/plugins/cloud/serializers/account_attrs.py:177
msgid "IP segment"
msgstr "IP 网段"
#: xpack/plugins/cloud/serializers/account_attrs.py:173
#: xpack/plugins/cloud/serializers/account_attrs.py:181
msgid "Test port"
msgstr "测试端口"
#: xpack/plugins/cloud/serializers/account_attrs.py:176
#: xpack/plugins/cloud/serializers/account_attrs.py:184
msgid "Test timeout"
msgstr "测试超时时间"
@ -7216,9 +7213,13 @@ msgstr "执行次数"
msgid "Instance count"
msgstr "实例个数"
#: xpack/plugins/cloud/serializers/task.py:63
msgid "Linux admin user"
msgstr "Linux 管理员"
#: xpack/plugins/cloud/tasks.py:27
msgid "Run sync instance task"
msgstr "执行同步实例任务"
#: xpack/plugins/cloud/tasks.py:41
msgid "Period clean sync instance task execution"
msgstr "定期清除同步实例任务执行记录"
#: xpack/plugins/cloud/utils.py:69
msgid "Account unavailable"
@ -7288,11 +7289,14 @@ msgstr "旗舰版"
msgid "Community edition"
msgstr "社区版"
#~ msgid "Run sync instance task"
#~ msgstr "执行同步实例任务"
#~ msgid "Unix admin user"
#~ msgstr "Unix 管理员"
#~ msgid "Period clean sync instance task execution"
#~ msgstr "定期清除同步实例任务执行记录"
#~ msgid "Windows admin user"
#~ msgstr "Windows 管理员"
#~ msgid "Linux admin user"
#~ msgstr "Linux 管理员"
#~ msgid "Can push account to asset"
#~ msgstr "可以推送账号到资产"

View File

@ -1,14 +1,13 @@
#!/usr/bin/python
import os
from typing import Callable
from django.apps import apps
from django.conf import settings
from django.db.models import F
from django.utils.translation import gettext_lazy as _, gettext, get_language
from treelib import Tree
from treelib.exceptions import NodeIDAbsentError
from django.utils.translation import gettext_lazy as _, gettext, get_language
from django.conf import settings
from django.apps import apps
from django.db.models import F, Count
from common.tree import TreeNode
from .models import Permission, ContentType
@ -77,6 +76,7 @@ special_pid_mapper = {
"accounts.pushaccountautomation": "push_account_node",
"accounts.view_pushaccountexecution": "push_account_node",
"accounts.add_pushaccountexecution": "push_account_node",
"accounts.gatheredaccount": "gather_account_node",
"accounts.gatheraccountsautomation": "gather_account_node",
"accounts.view_gatheraccountsexecution": "gather_account_node",
"accounts.add_gatheraccountsexecution": "gather_account_node",