mirror of https://github.com/jumpserver/jumpserver
perf: 修改翻译
parent
076afb2b8b
commit
eb16e3c7cb
|
@ -202,7 +202,7 @@ class AllTypes(ChoicesMixin):
|
|||
|
||||
@classmethod
|
||||
def create_or_update_internal_platforms(cls):
|
||||
print("Create internal platforms")
|
||||
print("\n\tCreate internal platforms")
|
||||
for category, type_cls in cls.category_types():
|
||||
print("\t## Category: {}".format(category.label))
|
||||
data = type_cls.internal_platforms()
|
||||
|
|
|
@ -19,10 +19,10 @@ def migrate_nodes_value_with_slash(apps, schema_editor):
|
|||
db_alias = schema_editor.connection.alias
|
||||
nodes = model.objects.using(db_alias).filter(value__contains='/')
|
||||
print('')
|
||||
print("- Start migrate node value if has /")
|
||||
print("\t- Start migrate node value if has /")
|
||||
for i, node in enumerate(list(nodes)):
|
||||
new_value = node.value.replace('/', '|')
|
||||
print("{} start migrate node value: {} => {}".format(i, node.value, new_value))
|
||||
print("\t - {} start migrate node value: {} => {}".format(i, node.value, new_value))
|
||||
node.value = new_value
|
||||
node.save()
|
||||
|
||||
|
@ -31,9 +31,9 @@ def migrate_nodes_full_value(apps, schema_editor):
|
|||
model = apps.get_model("assets", "Node")
|
||||
db_alias = schema_editor.connection.alias
|
||||
nodes = model.objects.using(db_alias).all()
|
||||
print("\n- Start migrate node full value")
|
||||
print("\n\t- Start migrate node full value")
|
||||
for i, node in enumerate(list(nodes)):
|
||||
print("{} start migrate {} node full value".format(i, node.value))
|
||||
print("\t - {} start migrate {} node full value".format(i, node.value))
|
||||
ancestor_keys = get_node_ancestor_keys(node.key, True)
|
||||
values = model.objects.filter(key__in=ancestor_keys).values_list('key', 'value')
|
||||
values = [v for k, v in sorted(values, key=lambda x: len(x[0]))]
|
||||
|
|
|
@ -27,6 +27,7 @@ def migrate_database_to_asset(apps, *args):
|
|||
applications = app_model.objects.filter(category='db')
|
||||
platforms = platform_model.objects.all().filter(internal=True)
|
||||
platforms_map = {p.type: p for p in platforms}
|
||||
print()
|
||||
|
||||
for app in applications:
|
||||
attrs = {'host': '', 'port': 0, 'database': ''}
|
||||
|
|
|
@ -117,7 +117,7 @@ class Migration(migrations.Migration):
|
|||
bases=('assets.baseautomation',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='VerifySecretAutomation',
|
||||
name='VerifyAccountAutomation',
|
||||
fields=[
|
||||
('baseautomation_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='assets.baseautomation')),
|
||||
],
|
||||
|
|
|
@ -14,10 +14,10 @@ from assets.models import Node, Asset
|
|||
class AutomationTypes(models.TextChoices):
|
||||
ping = 'ping', _('Ping')
|
||||
gather_facts = 'gather_facts', _('Gather facts')
|
||||
create_account = 'create_account', _('Create account')
|
||||
push_account = 'push_account', _('Create account')
|
||||
change_secret = 'change_secret', _('Change secret')
|
||||
verify_account = 'verify_account', _('Verify account')
|
||||
gather_accounts = 'gather_accounts', _('Gather accounts')
|
||||
gather_account = 'gather_account', _('Gather account')
|
||||
|
||||
|
||||
class BaseAutomation(JMSOrgBaseModel, PeriodTaskModelMixin):
|
||||
|
@ -74,14 +74,14 @@ class BaseAutomation(JMSOrgBaseModel, PeriodTaskModelMixin):
|
|||
|
||||
class Meta:
|
||||
unique_together = [('org_id', 'name')]
|
||||
verbose_name = _("Automation plan")
|
||||
verbose_name = _("Automation task")
|
||||
|
||||
|
||||
class AutomationExecution(OrgModelMixin):
|
||||
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
|
||||
automation = models.ForeignKey(
|
||||
'BaseAutomation', related_name='executions', on_delete=models.CASCADE,
|
||||
verbose_name=_('Automation strategy')
|
||||
verbose_name=_('Automation task')
|
||||
)
|
||||
status = models.CharField(max_length=16, default='pending')
|
||||
date_created = models.DateTimeField(auto_now_add=True, verbose_name=_('Date created'))
|
||||
|
@ -96,7 +96,7 @@ class AutomationExecution(OrgModelMixin):
|
|||
)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('Automation strategy execution')
|
||||
verbose_name = _('Automation task execution')
|
||||
|
||||
@property
|
||||
def manager_type(self):
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from ops.const import StrategyChoice
|
||||
from .base import BaseAutomation
|
||||
|
||||
|
||||
class VerifySecretAutomation(BaseAutomation):
|
||||
class VerifyAccountAutomation(BaseAutomation):
|
||||
class Meta:
|
||||
verbose_name = _("Verify secret automation")
|
||||
verbose_name = _("Verify account automation")
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
self.type = 'verify_secret'
|
||||
self.type = 'verify_account'
|
||||
super().save(*args, **kwargs)
|
||||
|
|
|
@ -16,5 +16,14 @@ class WebSerializer(AssetSerializer):
|
|||
**AssetSerializer.Meta.extra_kwargs,
|
||||
'address': {
|
||||
'label': 'URL'
|
||||
},
|
||||
'username_selector': {
|
||||
'default': 'input[type=text]'
|
||||
},
|
||||
'password_selector': {
|
||||
'default': 'input[type=password]'
|
||||
},
|
||||
'submit_selector': {
|
||||
'default': 'button[type=submit]',
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d7d4ace7d7ec976b0321bde41789f994f02e3ab6f034828cbfb7e675a313611f
|
||||
size 131531
|
||||
oid sha256:e0070188de11b8ace3a23cdf03ac803b50bf98beccef49b94bcfd0131fea8604
|
||||
size 119875
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-10-19 10:41+0800\n"
|
||||
"POT-Creation-Date: 2022-10-19 14:41+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"
|
||||
|
@ -575,24 +575,6 @@ msgstr "ノードにアセットを追加する"
|
|||
msgid "Move asset to node"
|
||||
msgstr "アセットをノードに移動する"
|
||||
|
||||
#: assets/models/automations/account_discovery.py:10
|
||||
#, fuzzy
|
||||
#| msgid "Approve strategy"
|
||||
msgid "Discovery strategy"
|
||||
msgstr "戦略を承認する"
|
||||
|
||||
#: assets/models/automations/account_reconcile.py:9
|
||||
#, fuzzy
|
||||
#| msgid "Hostname strategy"
|
||||
msgid "Reconcile strategy"
|
||||
msgstr "ホスト名戦略"
|
||||
|
||||
#: assets/models/automations/account_verify.py:9
|
||||
#, fuzzy
|
||||
#| msgid "SSH Key strategy"
|
||||
msgid "Verify strategy"
|
||||
msgstr "SSHキー戦略"
|
||||
|
||||
#: assets/models/automations/base.py:15
|
||||
msgid "Ping"
|
||||
msgstr ""
|
||||
|
@ -618,14 +600,12 @@ msgstr "秘密を改める"
|
|||
|
||||
#: assets/models/automations/base.py:19
|
||||
#, fuzzy
|
||||
#| msgid "Verify auth"
|
||||
msgid "Verify account"
|
||||
msgstr "パスワード/キーの確認"
|
||||
#| msgid "Verify code"
|
||||
msgid "Verify secret"
|
||||
msgstr "コードの確認"
|
||||
|
||||
#: assets/models/automations/base.py:20
|
||||
#, fuzzy
|
||||
#| msgid "Gather account"
|
||||
msgid "Gather accounts"
|
||||
#: assets/models/automations/base.py:20 rbac/tree.py:53
|
||||
msgid "Gather account"
|
||||
msgstr "アカウントを集める"
|
||||
|
||||
#: assets/models/automations/base.py:24 assets/models/cmd_filter.py:38
|
||||
|
@ -641,18 +621,12 @@ msgstr "アカウント"
|
|||
msgid "Assets"
|
||||
msgstr "資産"
|
||||
|
||||
#: assets/models/automations/base.py:77
|
||||
#: assets/models/automations/base.py:77 assets/models/automations/base.py:84
|
||||
#, fuzzy
|
||||
#| msgid "Automatic managed"
|
||||
msgid "Automation plan"
|
||||
msgid "Automation task"
|
||||
msgstr "自動管理"
|
||||
|
||||
#: assets/models/automations/base.py:84
|
||||
#, fuzzy
|
||||
#| msgid "Hostname strategy"
|
||||
msgid "Automation strategy"
|
||||
msgstr "ホスト名戦略"
|
||||
|
||||
#: assets/models/automations/base.py:88 assets/models/backup.py:77
|
||||
#: audits/models.py:44 ops/models/base.py:54
|
||||
#: perms/models/asset_permission.py:76 terminal/models/session.py:43
|
||||
|
@ -685,7 +659,7 @@ msgstr "トリガーモード"
|
|||
#: assets/models/automations/base.py:99
|
||||
#, fuzzy
|
||||
#| msgid "Command execution"
|
||||
msgid "Automation strategy execution"
|
||||
msgid "Automation task execution"
|
||||
msgstr "コマンド実行"
|
||||
|
||||
#: assets/models/automations/change_secret.py:13
|
||||
|
@ -765,9 +739,9 @@ msgstr "受信者"
|
|||
|
||||
#: assets/models/automations/change_secret.py:42
|
||||
#, fuzzy
|
||||
#| msgid "Can change auth setting"
|
||||
msgid "Change auth strategy"
|
||||
msgstr "資格認定の設定"
|
||||
#| msgid "Change auth"
|
||||
msgid "Change secret automation"
|
||||
msgstr "秘密を改める"
|
||||
|
||||
#: assets/models/automations/change_secret.py:48
|
||||
#, fuzzy
|
||||
|
@ -787,12 +761,28 @@ msgstr "開始日"
|
|||
msgid "Error"
|
||||
msgstr "企業微信エラー"
|
||||
|
||||
#: assets/models/automations/discovery_account.py:8
|
||||
#, fuzzy
|
||||
#| msgid "Verify auth"
|
||||
msgid "Discovery account automation"
|
||||
msgstr "パスワード/キーの確認"
|
||||
|
||||
#: assets/models/automations/gather_facts.py:11
|
||||
#, fuzzy
|
||||
#| msgid "Gather assets users"
|
||||
msgid "Gather asset facts"
|
||||
msgstr "資産ユーザーの収集"
|
||||
|
||||
#: assets/models/automations/push_account.py:8
|
||||
#, fuzzy
|
||||
#| msgid "Automatic managed"
|
||||
msgid "Push automation"
|
||||
msgstr "自動管理"
|
||||
|
||||
#: assets/models/automations/verify_secret.py:8
|
||||
msgid "Verify secret automation"
|
||||
msgstr ""
|
||||
|
||||
#: assets/models/backup.py:38 assets/models/backup.py:96
|
||||
msgid "Account backup plan"
|
||||
msgstr "アカウントバックアップ計画"
|
||||
|
@ -1063,13 +1053,13 @@ msgstr "資産ユーザーの収集"
|
|||
#: assets/models/platform.py:49
|
||||
#, fuzzy
|
||||
#| msgid "Create account successfully"
|
||||
msgid "Create account enabled"
|
||||
msgid "Push account enabled"
|
||||
msgstr "アカウントを正常に作成"
|
||||
|
||||
#: assets/models/platform.py:50
|
||||
#, fuzzy
|
||||
#| msgid "Create account successfully"
|
||||
msgid "Create account method"
|
||||
msgid "Push account method"
|
||||
msgstr "アカウントを正常に作成"
|
||||
|
||||
#: assets/models/platform.py:51
|
||||
|
@ -3396,10 +3386,6 @@ msgstr "クラウドインポート"
|
|||
msgid "Backup account"
|
||||
msgstr "バックアップアカウント"
|
||||
|
||||
#: rbac/tree.py:53
|
||||
msgid "Gather account"
|
||||
msgstr "アカウントを集める"
|
||||
|
||||
#: rbac/tree.py:54
|
||||
msgid "App change auth"
|
||||
msgstr "応用改密"
|
||||
|
@ -6864,6 +6850,41 @@ msgstr "究極のエディション"
|
|||
msgid "Community edition"
|
||||
msgstr "コミュニティ版"
|
||||
|
||||
#, fuzzy
|
||||
#~| msgid "Verify auth"
|
||||
#~ msgid "Verify account"
|
||||
#~ msgstr "パスワード/キーの確認"
|
||||
|
||||
#, fuzzy
|
||||
#~| msgid "Gather account"
|
||||
#~ msgid "Gather accounts"
|
||||
#~ msgstr "アカウントを集める"
|
||||
|
||||
#, fuzzy
|
||||
#~| msgid "Hostname strategy"
|
||||
#~ msgid "Automation strategy"
|
||||
#~ msgstr "ホスト名戦略"
|
||||
|
||||
#, fuzzy
|
||||
#~| msgid "Approve strategy"
|
||||
#~ msgid "Discovery strategy"
|
||||
#~ msgstr "戦略を承認する"
|
||||
|
||||
#, fuzzy
|
||||
#~| msgid "Hostname strategy"
|
||||
#~ msgid "Reconcile strategy"
|
||||
#~ msgstr "ホスト名戦略"
|
||||
|
||||
#, fuzzy
|
||||
#~| msgid "SSH Key strategy"
|
||||
#~ msgid "Verify strategy"
|
||||
#~ msgstr "SSHキー戦略"
|
||||
|
||||
#, fuzzy
|
||||
#~| msgid "Can change auth setting"
|
||||
#~ msgid "Change auth strategy"
|
||||
#~ msgstr "資格認定の設定"
|
||||
|
||||
#~ msgid "System User"
|
||||
#~ msgstr "システムユーザー"
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a89e824cdc4abeea54ffba79270406eefe3a260b764acb79cd42e6a11d4c03a2
|
||||
size 108405
|
||||
oid sha256:7e313c2d3223de35efb1e9449ab3f6ef33a9d1d565b41ff97b8601c50cf4f70b
|
||||
size 101988
|
||||
|
|
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: JumpServer 0.3.3\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-10-19 10:41+0800\n"
|
||||
"POT-Creation-Date: 2022-10-19 14:41+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"
|
||||
|
@ -287,10 +287,8 @@ msgid "App assets"
|
|||
msgstr "资产管理"
|
||||
|
||||
#: assets/automations/base/manager.py:74
|
||||
#, fuzzy
|
||||
#| msgid "Disabled"
|
||||
msgid "{} disabled"
|
||||
msgstr "禁用"
|
||||
msgstr "{} 已禁用"
|
||||
|
||||
#: assets/const/category.py:11 settings/serializers/auth/radius.py:14
|
||||
#: settings/serializers/auth/sms.py:56 terminal/models/endpoint.py:11
|
||||
|
@ -560,33 +558,15 @@ msgstr "添加资产到节点"
|
|||
msgid "Move asset to node"
|
||||
msgstr "移动资产到节点"
|
||||
|
||||
#: assets/models/automations/account_discovery.py:10
|
||||
msgid "Discovery strategy"
|
||||
msgstr "自动发现策略"
|
||||
|
||||
#: assets/models/automations/account_reconcile.py:9
|
||||
msgid "Reconcile strategy"
|
||||
msgstr "主机名策略"
|
||||
|
||||
#: assets/models/automations/account_verify.py:9
|
||||
#, fuzzy
|
||||
#| msgid "SSH Key strategy"
|
||||
msgid "Verify strategy"
|
||||
msgstr "SSH 密钥策略"
|
||||
|
||||
#: assets/models/automations/base.py:15
|
||||
msgid "Ping"
|
||||
msgstr ""
|
||||
|
||||
#: assets/models/automations/base.py:16
|
||||
#, fuzzy
|
||||
#| msgid "Gather account"
|
||||
msgid "Gather facts"
|
||||
msgstr "收集账号"
|
||||
msgstr "收集信息"
|
||||
|
||||
#: assets/models/automations/base.py:17
|
||||
#, fuzzy
|
||||
#| msgid "Gather account"
|
||||
msgid "Create account"
|
||||
msgstr "收集账号"
|
||||
|
||||
|
@ -599,14 +579,12 @@ msgstr "执行改密"
|
|||
|
||||
#: assets/models/automations/base.py:19
|
||||
#, fuzzy
|
||||
#| msgid "Verify auth"
|
||||
msgid "Verify account"
|
||||
msgstr "验证密码/密钥"
|
||||
#| msgid "Verify code"
|
||||
msgid "Verify secret"
|
||||
msgstr "验证码"
|
||||
|
||||
#: assets/models/automations/base.py:20
|
||||
#, fuzzy
|
||||
#| msgid "Gather account"
|
||||
msgid "Gather accounts"
|
||||
#: assets/models/automations/base.py:20 rbac/tree.py:53
|
||||
msgid "Gather account"
|
||||
msgstr "收集账号"
|
||||
|
||||
#: assets/models/automations/base.py:24 assets/models/cmd_filter.py:38
|
||||
|
@ -622,17 +600,9 @@ msgstr "账号管理"
|
|||
msgid "Assets"
|
||||
msgstr "资产"
|
||||
|
||||
#: assets/models/automations/base.py:77
|
||||
#, fuzzy
|
||||
#| msgid "Automatic managed"
|
||||
msgid "Automation plan"
|
||||
msgstr "托管密码"
|
||||
|
||||
#: assets/models/automations/base.py:84
|
||||
#, fuzzy
|
||||
#| msgid "Hostname strategy"
|
||||
msgid "Automation strategy"
|
||||
msgstr "主机名策略"
|
||||
#: assets/models/automations/base.py:77 assets/models/automations/base.py:84
|
||||
msgid "Automation task"
|
||||
msgstr "自动化任务"
|
||||
|
||||
#: assets/models/automations/base.py:88 assets/models/backup.py:77
|
||||
#: audits/models.py:44 ops/models/base.py:54
|
||||
|
@ -664,14 +634,12 @@ msgid "Trigger mode"
|
|||
msgstr "触发模式"
|
||||
|
||||
#: assets/models/automations/base.py:99
|
||||
#, fuzzy
|
||||
#| msgid "Command execution"
|
||||
msgid "Automation strategy execution"
|
||||
msgstr "命令执行"
|
||||
msgid "Automation task execution"
|
||||
msgstr "自动化任务执行"
|
||||
|
||||
#: assets/models/automations/change_secret.py:13
|
||||
msgid "Specific"
|
||||
msgstr ""
|
||||
msgstr "指定"
|
||||
|
||||
#: assets/models/automations/change_secret.py:14 ops/const.py:20
|
||||
#: xpack/plugins/change_auth_plan/models/base.py:28
|
||||
|
@ -725,14 +693,10 @@ msgid "Password rules"
|
|||
msgstr "密码规则"
|
||||
|
||||
#: assets/models/automations/change_secret.py:32 assets/models/base.py:60
|
||||
#, fuzzy
|
||||
#| msgid "SSH Key"
|
||||
msgid "SSH key"
|
||||
msgstr "SSH 密钥"
|
||||
|
||||
#: assets/models/automations/change_secret.py:34
|
||||
#, fuzzy
|
||||
#| msgid "SSH Key strategy"
|
||||
msgid "SSH key strategy"
|
||||
msgstr "SSH 密钥策略"
|
||||
|
||||
|
@ -745,34 +709,36 @@ msgid "Recipient"
|
|||
msgstr "收件人"
|
||||
|
||||
#: assets/models/automations/change_secret.py:42
|
||||
#, fuzzy
|
||||
#| msgid "Can change auth setting"
|
||||
msgid "Change auth strategy"
|
||||
msgstr "认证设置"
|
||||
msgid "Change secret automation"
|
||||
msgstr "自动化改密"
|
||||
|
||||
#: assets/models/automations/change_secret.py:48
|
||||
#, fuzzy
|
||||
#| msgid "Secret"
|
||||
msgid "Old secret"
|
||||
msgstr "密钥"
|
||||
msgstr "原来密码"
|
||||
|
||||
#: assets/models/automations/change_secret.py:50
|
||||
#, fuzzy
|
||||
#| msgid "Date start"
|
||||
msgid "Date started"
|
||||
msgstr "开始日期"
|
||||
|
||||
#: assets/models/automations/change_secret.py:53
|
||||
#, fuzzy
|
||||
#| msgid "WeCom Error"
|
||||
msgid "Error"
|
||||
msgstr "企业微信错误"
|
||||
msgstr "错误"
|
||||
|
||||
#: assets/models/automations/discovery_account.py:8
|
||||
msgid "Discovery account automation"
|
||||
msgstr "自动化账号发现"
|
||||
|
||||
#: assets/models/automations/gather_facts.py:11
|
||||
#, fuzzy
|
||||
#| msgid "Gather assets users"
|
||||
msgid "Gather asset facts"
|
||||
msgstr "收集资产上的用户"
|
||||
msgstr "收集资产信息"
|
||||
|
||||
#: assets/models/automations/push_account.py:8
|
||||
msgid "Push automation"
|
||||
msgstr "自动化推送"
|
||||
|
||||
#: assets/models/automations/verify_secret.py:8
|
||||
msgid "Verify secret automation"
|
||||
msgstr "自动化验证"
|
||||
|
||||
#: assets/models/backup.py:38 assets/models/backup.py:96
|
||||
msgid "Account backup plan"
|
||||
|
@ -838,14 +804,12 @@ msgid "Access key"
|
|||
msgstr "Access key"
|
||||
|
||||
#: assets/models/base.py:67
|
||||
#, fuzzy
|
||||
#| msgid "Secret key"
|
||||
msgid "Secret type"
|
||||
msgstr "Secret key"
|
||||
msgstr "密文类型"
|
||||
|
||||
#: assets/models/base.py:69
|
||||
msgid "Privileged"
|
||||
msgstr ""
|
||||
msgstr "特权的"
|
||||
|
||||
#: assets/models/cmd_filter.py:32 perms/models/asset_permission.py:61
|
||||
#: users/models/group.py:31 users/models/user.py:671
|
||||
|
@ -914,9 +878,8 @@ msgstr "测试网关"
|
|||
|
||||
#: assets/models/domain.py:142
|
||||
#, fuzzy, python-brace-format
|
||||
#| msgid "Unable to connect to port {port} on {ip}"
|
||||
msgid "Unable to connect to port {port} on {address}"
|
||||
msgstr "无法连接到 {ip} 上的端口 {port}"
|
||||
msgstr "无法连接到 {address} 上的端口 {port}"
|
||||
|
||||
#: assets/models/domain.py:145 authentication/middleware.py:75
|
||||
#: xpack/plugins/cloud/providers/fc.py:48
|
||||
|
@ -1002,10 +965,8 @@ msgid "Can match node"
|
|||
msgstr "可以匹配节点"
|
||||
|
||||
#: assets/models/platform.py:21
|
||||
#, fuzzy
|
||||
#| msgid "MFA required"
|
||||
msgid "Required"
|
||||
msgstr "需要 MFA 认证"
|
||||
msgstr "必需的"
|
||||
|
||||
#: assets/models/platform.py:24 users/templates/users/reset_password.html:29
|
||||
msgid "Setting"
|
||||
|
@ -1017,65 +978,47 @@ msgstr "启用"
|
|||
|
||||
#: assets/models/platform.py:44
|
||||
msgid "Ansible config"
|
||||
msgstr ""
|
||||
msgstr "Ansible 配置"
|
||||
|
||||
#: assets/models/platform.py:45
|
||||
#, fuzzy
|
||||
#| msgid "MFA enabled"
|
||||
msgid "Ping enabled"
|
||||
msgstr "MFA 已启用"
|
||||
msgstr "探测资产"
|
||||
|
||||
#: assets/models/platform.py:46
|
||||
msgid "Ping method"
|
||||
msgstr ""
|
||||
msgstr "探测方式"
|
||||
|
||||
#: assets/models/platform.py:47 assets/models/platform.py:55
|
||||
#, fuzzy
|
||||
#| msgid "Gather assets users"
|
||||
msgid "Gather facts enabled"
|
||||
msgstr "收集资产上的用户"
|
||||
msgstr "收集资产信息"
|
||||
|
||||
#: assets/models/platform.py:48 assets/models/platform.py:56
|
||||
#, fuzzy
|
||||
#| msgid "Gather assets users"
|
||||
msgid "Gather facts method"
|
||||
msgstr "收集资产上的用户"
|
||||
msgstr "收集资产信息方式"
|
||||
|
||||
#: assets/models/platform.py:49
|
||||
#, fuzzy
|
||||
#| msgid "Create account successfully"
|
||||
msgid "Create account enabled"
|
||||
msgstr "创建账号成功"
|
||||
msgid "Push account enabled"
|
||||
msgstr "推送账号"
|
||||
|
||||
#: assets/models/platform.py:50
|
||||
#, fuzzy
|
||||
#| msgid "Create account successfully"
|
||||
msgid "Create account method"
|
||||
msgstr "创建账号成功"
|
||||
msgid "Push account method"
|
||||
msgstr "推送方式"
|
||||
|
||||
#: assets/models/platform.py:51
|
||||
#, fuzzy
|
||||
#| msgid "Change Password"
|
||||
msgid "Change password enabled"
|
||||
msgstr "更改密码"
|
||||
|
||||
#: assets/models/platform.py:52
|
||||
#, fuzzy
|
||||
#| msgid "Change Password"
|
||||
msgid "Change password method"
|
||||
msgstr "更改密码"
|
||||
msgstr "改密方式"
|
||||
|
||||
#: assets/models/platform.py:53
|
||||
#, fuzzy
|
||||
#| msgid "Service account key"
|
||||
msgid "Verify account enabled"
|
||||
msgstr "服务账号密钥"
|
||||
msgstr "校验账号"
|
||||
|
||||
#: assets/models/platform.py:54
|
||||
#, fuzzy
|
||||
#| msgid "Verify auth"
|
||||
msgid "Verify account method"
|
||||
msgstr "验证密码/密钥"
|
||||
msgstr "验证z"
|
||||
|
||||
#: assets/models/platform.py:71 tickets/models/ticket/general.py:298
|
||||
msgid "Meta"
|
||||
|
@ -1313,30 +1256,24 @@ msgid "SFTP home"
|
|||
msgstr "SFTP根路径"
|
||||
|
||||
#: assets/serializers/platform.py:28
|
||||
#, fuzzy
|
||||
#| msgid "Auto"
|
||||
msgid "Auto fill"
|
||||
msgstr "自动"
|
||||
msgstr "自动填充"
|
||||
|
||||
#: assets/serializers/platform.py:29
|
||||
#, fuzzy
|
||||
#| msgid "Username attr"
|
||||
msgid "Username selector"
|
||||
msgstr "用户名属性"
|
||||
msgstr "用户名选择器"
|
||||
|
||||
#: assets/serializers/platform.py:30
|
||||
#, fuzzy
|
||||
#| msgid "Password rules"
|
||||
msgid "Password selector"
|
||||
msgstr "密码规则"
|
||||
msgstr "密码选择器"
|
||||
|
||||
#: assets/serializers/platform.py:31
|
||||
msgid "Submit selector"
|
||||
msgstr ""
|
||||
msgstr "提交按钮选择器"
|
||||
|
||||
#: assets/serializers/platform.py:64
|
||||
msgid "Primary"
|
||||
msgstr ""
|
||||
msgstr "主要的"
|
||||
|
||||
#: assets/serializers/utils.py:11
|
||||
msgid "Password can not contains `{{` "
|
||||
|
@ -2549,7 +2486,7 @@ msgstr "%s对象不存在"
|
|||
#: common/drf/fields.py:71
|
||||
#, python-brace-format
|
||||
msgid "Incorrect type. Expected pk value, received {data_type}."
|
||||
msgstr ""
|
||||
msgstr "不正确的类型。期望 pk 值,收到 {data_type} 类型。"
|
||||
|
||||
#: common/drf/parsers/base.py:17
|
||||
msgid "The file content overflowed (The maximum length `{}` bytes)"
|
||||
|
@ -2674,10 +2611,8 @@ msgid "Invalid ip"
|
|||
msgstr "无效IP"
|
||||
|
||||
#: common/utils/ip/utils.py:78
|
||||
#, fuzzy
|
||||
#| msgid "Invalid signature."
|
||||
msgid "Invalid address"
|
||||
msgstr "签名无效"
|
||||
msgstr "不合理的地址"
|
||||
|
||||
#: common/validators.py:14
|
||||
msgid "Special char not allowed"
|
||||
|
@ -2748,20 +2683,16 @@ msgid "Site message"
|
|||
msgstr "站内信"
|
||||
|
||||
#: ops/ansible/inventory.py:76
|
||||
#, fuzzy
|
||||
#| msgid "Account unavailable"
|
||||
msgid "No account available"
|
||||
msgstr "账号无效"
|
||||
msgstr "没有账号可以使用"
|
||||
|
||||
#: ops/ansible/inventory.py:171
|
||||
#, fuzzy
|
||||
#| msgid "User disabled."
|
||||
msgid "Ansible disabled"
|
||||
msgstr "用户已禁用"
|
||||
msgstr "Ansible 已禁用"
|
||||
|
||||
#: ops/ansible/inventory.py:186
|
||||
msgid "Skip hosts below:"
|
||||
msgstr ""
|
||||
msgstr "跳过一下主机:"
|
||||
|
||||
#: ops/api/celery.py:61 ops/api/celery.py:76
|
||||
msgid "Waiting task start"
|
||||
|
@ -2773,21 +2704,17 @@ msgstr "作业中心"
|
|||
|
||||
#: ops/const.py:6
|
||||
msgid "Push"
|
||||
msgstr ""
|
||||
msgstr "推送"
|
||||
|
||||
#: ops/const.py:7
|
||||
#, fuzzy
|
||||
#| msgid "Verified"
|
||||
msgid "Verify"
|
||||
msgstr "已校验"
|
||||
msgstr "校验"
|
||||
|
||||
#: ops/const.py:8
|
||||
msgid "Collect"
|
||||
msgstr ""
|
||||
|
||||
#: ops/const.py:9
|
||||
#, fuzzy
|
||||
#| msgid "Change Password"
|
||||
msgid "Change password"
|
||||
msgstr "更改密码"
|
||||
|
||||
|
@ -2833,10 +2760,8 @@ msgid "Args"
|
|||
msgstr "参数"
|
||||
|
||||
#: ops/models/adhoc.py:21 ops/models/base.py:20 ops/models/playbook.py:27
|
||||
#, fuzzy
|
||||
#| msgid "Command execution"
|
||||
msgid "Last execution"
|
||||
msgstr "命令执行"
|
||||
msgstr "最后执行"
|
||||
|
||||
#: ops/models/adhoc.py:36
|
||||
msgid "Adhoc"
|
||||
|
@ -2851,16 +2776,12 @@ msgid "Creator"
|
|||
msgstr "创建者"
|
||||
|
||||
#: ops/models/base.py:19
|
||||
#, fuzzy
|
||||
#| msgid "Account key"
|
||||
msgid "Account policy"
|
||||
msgstr "账号密钥"
|
||||
msgstr "账号策略"
|
||||
|
||||
#: ops/models/base.py:21
|
||||
#, fuzzy
|
||||
#| msgid "Date last sync"
|
||||
msgid "Date last run"
|
||||
msgstr "最后同步日期"
|
||||
msgstr "最后执行日期"
|
||||
|
||||
#: ops/models/base.py:50 xpack/plugins/cloud/models.py:169
|
||||
msgid "Result"
|
||||
|
@ -2868,7 +2789,7 @@ msgstr "结果"
|
|||
|
||||
#: ops/models/base.py:51
|
||||
msgid "Summary"
|
||||
msgstr ""
|
||||
msgstr "汇总"
|
||||
|
||||
#: ops/models/celery.py:16 terminal/models/task.py:18
|
||||
msgid "Kwargs"
|
||||
|
@ -2886,19 +2807,19 @@ msgstr "结束"
|
|||
|
||||
#: ops/models/playbook.py:10
|
||||
msgid "Path"
|
||||
msgstr ""
|
||||
msgstr "路径"
|
||||
|
||||
#: ops/models/playbook.py:18
|
||||
msgid "Playbook template"
|
||||
msgstr ""
|
||||
msgstr "Playbook 模版"
|
||||
|
||||
#: ops/models/playbook.py:23
|
||||
msgid "Playbook"
|
||||
msgstr ""
|
||||
msgstr "Playbook"
|
||||
|
||||
#: ops/models/playbook.py:24
|
||||
msgid "Owner"
|
||||
msgstr ""
|
||||
msgstr "Owner"
|
||||
|
||||
#: ops/models/playbook.py:26 settings/serializers/auth/sms.py:64
|
||||
msgid "Template"
|
||||
|
@ -2910,10 +2831,8 @@ msgid "Task"
|
|||
msgstr "任务"
|
||||
|
||||
#: ops/models/playbook.py:39
|
||||
#, fuzzy
|
||||
#| msgid "Run user"
|
||||
msgid "Run dir"
|
||||
msgstr "运行的用户"
|
||||
msgstr "运行目录"
|
||||
|
||||
#: ops/notifications.py:17
|
||||
msgid "Server performance"
|
||||
|
@ -2944,16 +2863,12 @@ msgid "CPU load more than {max_threshold}: => {value}"
|
|||
msgstr "CPU 使用率超过 {max_threshold}: => {value}"
|
||||
|
||||
#: ops/tasks.py:33
|
||||
#, fuzzy
|
||||
#| msgid "Run asset"
|
||||
msgid "Run ansible task"
|
||||
msgstr "运行的资产"
|
||||
msgstr "运行 ansible 任务"
|
||||
|
||||
#: ops/tasks.py:57
|
||||
#, fuzzy
|
||||
#| msgid "Run command"
|
||||
msgid "Run ansible command"
|
||||
msgstr "运行的命令"
|
||||
msgstr "运行 ansible 命令"
|
||||
|
||||
#: ops/tasks.py:79
|
||||
msgid "Clean task history period"
|
||||
|
@ -3341,10 +3256,6 @@ msgstr "云同步"
|
|||
msgid "Backup account"
|
||||
msgstr "备份账号"
|
||||
|
||||
#: rbac/tree.py:53
|
||||
msgid "Gather account"
|
||||
msgstr "收集账号"
|
||||
|
||||
#: rbac/tree.py:54
|
||||
msgid "App change auth"
|
||||
msgstr "应用改密"
|
||||
|
@ -5294,10 +5205,8 @@ msgid "Apply assets"
|
|||
msgstr "申请资产"
|
||||
|
||||
#: tickets/models/ticket/apply_asset.py:17
|
||||
#, fuzzy
|
||||
#| msgid "Application account"
|
||||
msgid "Apply accounts"
|
||||
msgstr "应用账号"
|
||||
msgstr "申请账号"
|
||||
|
||||
#: tickets/models/ticket/command_confirm.py:10
|
||||
msgid "Run user"
|
||||
|
@ -5308,8 +5217,6 @@ msgid "Run asset"
|
|||
msgstr "运行的资产"
|
||||
|
||||
#: tickets/models/ticket/command_confirm.py:13
|
||||
#, fuzzy
|
||||
#| msgid "account"
|
||||
msgid "Run account"
|
||||
msgstr "账号"
|
||||
|
||||
|
@ -5370,10 +5277,8 @@ msgid "Login asset"
|
|||
msgstr "登录资产"
|
||||
|
||||
#: tickets/models/ticket/login_asset_confirm.py:19
|
||||
#, fuzzy
|
||||
#| msgid "Login acl"
|
||||
msgid "Login account"
|
||||
msgstr "登录访问控制"
|
||||
msgstr "登录账号"
|
||||
|
||||
#: tickets/models/ticket/login_confirm.py:12
|
||||
msgid "Login datetime"
|
||||
|
@ -6754,6 +6659,31 @@ msgstr "旗舰版"
|
|||
msgid "Community edition"
|
||||
msgstr "社区版"
|
||||
|
||||
#~ msgid "Verify account"
|
||||
#~ msgstr "验证密钥"
|
||||
|
||||
#~ msgid "Gather accounts"
|
||||
#~ msgstr "收集账号"
|
||||
|
||||
#, fuzzy
|
||||
#~| msgid "Hostname strategy"
|
||||
#~ msgid "Automation strategy"
|
||||
#~ msgstr "主机名策略"
|
||||
|
||||
#~ msgid "Discovery strategy"
|
||||
#~ msgstr "自动发现策略"
|
||||
|
||||
#~ msgid "Reconcile strategy"
|
||||
#~ msgstr "主机名策略"
|
||||
|
||||
#~ msgid "Verify strategy"
|
||||
#~ msgstr "SSH 密钥策略"
|
||||
|
||||
#, fuzzy
|
||||
#~| msgid "Can change auth setting"
|
||||
#~ msgid "Change auth strategy"
|
||||
#~ msgstr "认证设置"
|
||||
|
||||
#~ msgid "System User"
|
||||
#~ msgstr "系统用户"
|
||||
|
||||
|
|
|
@ -34,13 +34,13 @@ def migrate_default_org_id(apps, schema_editor):
|
|||
for app, models_name in org_app_models:
|
||||
for model_name in models_name:
|
||||
t_start = time.time()
|
||||
print("Migrate model org id: {}".format(model_name), end='')
|
||||
print("\tMigrate model org id: {}".format(model_name), end='')
|
||||
sys.stdout.flush()
|
||||
|
||||
model_cls = apps.get_model(app, model_name)
|
||||
model_cls.objects.filter(org_id='').update(org_id=default_id)
|
||||
interval = round((time.time() - t_start) * 1000, 2)
|
||||
print(" done, use {} ms".format(interval))
|
||||
print("\tdone, use {} ms".format(interval))
|
||||
|
||||
|
||||
def add_all_user_to_default_org(apps, schema_editor):
|
||||
|
@ -53,16 +53,16 @@ def add_all_user_to_default_org(apps, schema_editor):
|
|||
|
||||
t_start = time.time()
|
||||
count = users_qs.count()
|
||||
print(f'Will add users to default org: {count}')
|
||||
print(f'\tWill add users to default org: {count}')
|
||||
|
||||
batch_size = 1000
|
||||
for i in range(0, count, batch_size):
|
||||
users = list(users_qs[i:i + batch_size])
|
||||
members = [org_members_model(user=user, org=default_org) for user in users]
|
||||
org_members_model.objects.bulk_create(members, ignore_conflicts=True)
|
||||
print(f'Add users to default org: {i+1}-{i+len(users)}')
|
||||
print(f'\t Add users to default org: {i+1}-{i+len(users)}')
|
||||
interval = round((time.time() - t_start) * 1000, 2)
|
||||
print(f'done, use {interval} ms')
|
||||
print(f'\tdone, use {interval} ms')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
|
@ -12,7 +12,7 @@ def fill_ticket_serial_number(apps, schema_editor):
|
|||
curr_day = '00000000'
|
||||
curr_num = 1
|
||||
|
||||
print(f'\n Fill ticket serial number ... ')
|
||||
print(f'\n\tFill ticket serial number ... ')
|
||||
for ticket in tickets:
|
||||
# 跑这个脚本的时候,所有 ticket.serial_num == null
|
||||
date_created = as_current_tz(ticket.date_created)
|
||||
|
@ -25,7 +25,6 @@ def fill_ticket_serial_number(apps, schema_editor):
|
|||
curr_num += 1
|
||||
|
||||
Ticket.objects.bulk_update(tickets, fields=('serial_num',))
|
||||
print(len(tickets), end='')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
|
@ -15,9 +15,9 @@ def migrate_system_to_account(apps, schema_editor):
|
|||
(apply_login_asset_ticket_model, 'apply_login_system_user', 'apply_login_account', False),
|
||||
)
|
||||
|
||||
print("\n Start migrate system user to account")
|
||||
print("\n\tStart migrate system user to account")
|
||||
for model, old_field, new_field, m2m in model_system_user_account:
|
||||
print(" - migrate '{}'".format(model.__name__))
|
||||
print("\t - migrate '{}'".format(model.__name__))
|
||||
count = 0
|
||||
bulk_size = 1000
|
||||
|
||||
|
|
Loading…
Reference in New Issue