perf: merge with dev

pull/11275/head
ibuler 2023-08-15 13:51:59 +08:00
commit 02f38fe37a
19 changed files with 511 additions and 335 deletions

View File

@ -43,7 +43,7 @@ class BaseVault(ABC):
'name', 'username', 'secret_type', 'name', 'username', 'secret_type',
'connectivity', 'su_from', 'privileged' 'connectivity', 'su_from', 'privileged'
]) ])
metadata = {field: str(value) for field, value in metadata.items()} metadata = {k: str(v)[:500] for k, v in metadata.items() if v}
return self._save_metadata(instance, metadata) return self._save_metadata(instance, metadata)
# -------- abstractmethod -------- # # -------- abstractmethod -------- #

View File

@ -1,9 +1,12 @@
from common.db.utils import get_logger
from .entries import build_entry from .entries import build_entry
from .service import VaultKVClient from .service import VaultKVClient
from ..base import BaseVault from ..base import BaseVault
__all__ = ['Vault'] __all__ = ['Vault']
logger = get_logger(__name__)
class Vault(BaseVault): class Vault(BaseVault):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@ -43,5 +46,8 @@ class Vault(BaseVault):
instance.mark_secret_save_to_vault() instance.mark_secret_save_to_vault()
def _save_metadata(self, instance, metadata): def _save_metadata(self, instance, metadata):
try:
entry = build_entry(instance) entry = build_entry(instance)
self.client.update_metadata(path=entry.full_path, metadata=metadata) self.client.update_metadata(path=entry.full_path, metadata=metadata)
except Exception as e:
logger.error(f'save metadata error: {e}')

View File

@ -1,8 +1,9 @@
# Generated by Django 4.1.10 on 2023-08-03 08:28 # Generated by Django 4.1.10 on 2023-08-03 08:28
from django.conf import settings from django.conf import settings
from django.db import migrations, models from django.db import migrations, models
import common.db.encoder
def migrate_recipients(apps, schema_editor): def migrate_recipients(apps, schema_editor):
account_backup_model = apps.get_model('accounts', 'AccountBackupAutomation') account_backup_model = apps.get_model('accounts', 'AccountBackupAutomation')
@ -13,13 +14,22 @@ def migrate_recipients(apps, schema_editor):
continue continue
account_backup.recipients_part_one.set(recipients) account_backup.recipients_part_one.set(recipients)
execution_bojs = [] objs = []
for execution in execution_model.objects.all(): for execution in execution_model.objects.all():
snapshot = execution.snapshot snapshot = execution.snapshot
recipients = snapshot.pop('recipients', {}) recipients = snapshot.pop('recipients', {})
snapshot.update({'recipients_part_one': recipients, 'recipients_part_two': {}}) snapshot.update({'recipients_part_one': recipients, 'recipients_part_two': {}})
execution_bojs.append(execution) objs.append(execution)
execution_model.objects.bulk_update(execution_bojs, ['snapshot']) execution_model.objects.bulk_update(objs, ['snapshot'])
def migrate_snapshot(apps, schema_editor):
model = apps.get_model('accounts', 'AccountBackupExecution')
objs = []
for execution in model.objects.all():
execution.snapshot = execution.plan_snapshot
objs.append(execution)
model.objects.bulk_update(objs, ['snapshot'])
class Migration(migrations.Migration): class Migration(migrations.Migration):
@ -45,12 +55,20 @@ class Migration(migrations.Migration):
to=settings.AUTH_USER_MODEL, verbose_name='Recipient part two' to=settings.AUTH_USER_MODEL, verbose_name='Recipient part two'
), ),
), ),
migrations.RenameField( migrations.AddField(
model_name='accountbackupexecution', model_name='accountbackupexecution',
old_name='plan_snapshot', name='snapshot',
new_name='snapshot', field=models.JSONField(
default=dict, encoder=common.db.encoder.ModelJSONFieldEncoder,
null=True, blank=True, verbose_name='Account backup snapshot'
), ),
),
migrations.RunPython(migrate_snapshot),
migrations.RunPython(migrate_recipients), migrations.RunPython(migrate_recipients),
migrations.RemoveField(
model_name='accountbackupexecution',
name='plan_snapshot',
),
migrations.RemoveField( migrations.RemoveField(
model_name='accountbackupautomation', model_name='accountbackupautomation',
name='recipients', name='recipients',

View File

@ -86,7 +86,7 @@ class ChangeSecretRecord(JMSBaseModel):
asset = models.ForeignKey('assets.Asset', on_delete=models.CASCADE, null=True) asset = models.ForeignKey('assets.Asset', on_delete=models.CASCADE, null=True)
account = models.ForeignKey('accounts.Account', on_delete=models.CASCADE, null=True) account = models.ForeignKey('accounts.Account', on_delete=models.CASCADE, null=True)
old_secret = fields.EncryptTextField(blank=True, null=True, verbose_name=_('Old secret')) old_secret = fields.EncryptTextField(blank=True, null=True, verbose_name=_('Old secret'))
new_secret = fields.EncryptTextField(blank=True, null=True, verbose_name=_('Secret')) new_secret = fields.EncryptTextField(blank=True, null=True, verbose_name=_('New secret'))
date_started = models.DateTimeField(blank=True, null=True, verbose_name=_('Date started')) date_started = models.DateTimeField(blank=True, null=True, verbose_name=_('Date started'))
date_finished = models.DateTimeField(blank=True, null=True, verbose_name=_('Date finished')) date_finished = models.DateTimeField(blank=True, null=True, verbose_name=_('Date finished'))
status = models.CharField(max_length=16, default='pending') status = models.CharField(max_length=16, default='pending')

View File

@ -52,11 +52,12 @@ class VaultModelMixin(models.Model):
abstract = True abstract = True
# 缓存 secret 值, lazy-property 不能用 # 缓存 secret 值, lazy-property 不能用
__secret = False __secret = None
@property @property
def secret(self): def secret(self):
if self.__secret is False: if self.__secret:
return self.__secret
from accounts.backends import vault_client from accounts.backends import vault_client
secret = vault_client.get(self) secret = vault_client.get(self)
if not secret and not self.secret_has_save_to_vault: if not secret and not self.secret_has_save_to_vault:
@ -72,6 +73,7 @@ class VaultModelMixin(models.Model):
先保存到 db, 再保存到 vault 同时删除本地 db _secret 先保存到 db, 再保存到 vault 同时删除本地 db _secret
""" """
self._secret = value self._secret = value
self.__secret = value
_secret_save_to_vault_mark = '# Secret-has-been-saved-to-vault #' _secret_save_to_vault_mark = '# Secret-has-been-saved-to-vault #'

View File

@ -1,4 +1,5 @@
import datetime from concurrent.futures import ThreadPoolExecutor, as_completed
from datetime import datetime
from celery import shared_task from celery import shared_task
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
@ -12,6 +13,22 @@ from ..const import VaultTypeChoices
logger = get_logger(__name__) logger = get_logger(__name__)
def sync_instance(instance):
instance_desc = f'[{instance._meta.verbose_name}-{instance.id}-{instance}]'
if instance.secret_has_save_to_vault:
msg = f'\033[32m- 跳过同步: {instance_desc}, 原因: [已同步]'
return "skipped", msg
try:
vault_client.create(instance)
except Exception as e:
msg = f'\033[31m- 同步失败: {instance_desc}, 原因: [{e}]'
return "failed", msg
else:
msg = f'\033[32m- 同步成功: {instance_desc}'
return "succeeded", msg
@shared_task(verbose_name=_('Sync secret to vault')) @shared_task(verbose_name=_('Sync secret to vault'))
def sync_secret_to_vault(): def sync_secret_to_vault():
if vault_client.is_type(VaultTypeChoices.local): if vault_client.is_type(VaultTypeChoices.local):
@ -19,38 +36,34 @@ def sync_secret_to_vault():
print('\033[35m>>> 当前 Vault 类型为本地数据库, 不需要同步') print('\033[35m>>> 当前 Vault 类型为本地数据库, 不需要同步')
return return
print('\033[33m>>> 开始同步密钥数据到 Vault ({})'.format(datetime.datetime.now())) failed, skipped, succeeded = 0, 0, 0
with tmp_to_root_org():
to_sync_models = [Account, AccountTemplate, Account.history.model] to_sync_models = [Account, AccountTemplate, Account.history.model]
print(f'\033[33m>>> 开始同步密钥数据到 Vault ({datetime.now().strftime("%Y-%m-%d %H:%M:%S")})')
with tmp_to_root_org():
instances = []
for model in to_sync_models: for model in to_sync_models:
print(f'\033[33m>>> 开始同步: {model.__module__}') instances += list(model.objects.all())
succeeded = []
failed = []
skipped = []
instances = model.objects.all()
for instance in instances:
instance_desc = f'[{instance}]'
if instance.secret_has_save_to_vault:
print(f'\033[32m- 跳过同步: {instance_desc}, 原因: [已同步]')
skipped.append(instance)
continue
try:
vault_client.create(instance)
except Exception as e:
failed.append(instance)
print(f'\033[31m- 同步失败: {instance_desc}, 原因: [{e}]')
else:
succeeded.append(instance)
print(f'\033[32m- 同步成功: {instance_desc}')
total = len(succeeded) + len(failed) + len(skipped) with ThreadPoolExecutor(max_workers=10) as executor:
tasks = [executor.submit(sync_instance, instance) for instance in instances]
for future in as_completed(tasks):
status, msg = future.result()
print(msg)
if status == "succeeded":
succeeded += 1
elif status == "failed":
failed += 1
elif status == "skipped":
skipped += 1
total = succeeded + failed + skipped
print( print(
f'\033[33m>>> 同步完成: {model.__module__}, ' f'\033[33m>>> 同步完成: {model.__module__}, '
f'共计: {total}, ' f'共计: {total}, '
f'成功: {len(succeeded)}, ' f'成功: {succeeded}, '
f'失败: {len(failed)}, ' f'失败: {failed}, '
f'跳过: {len(skipped)}' f'跳过: {skipped}'
) )
print(f'\033[33m>>> 全部同步完成 ({datetime.now().strftime("%Y-%m-%d %H:%M:%S")})')
print('\033[33m>>> 全部同步完成 ({})'.format(datetime.datetime.now()))
print('\033[0m') print('\033[0m')

View File

@ -224,7 +224,7 @@ class AllTypes(ChoicesMixin):
return dict(id='ROOT', name=_('All types'), title=_('All types'), open=True, isParent=True) return dict(id='ROOT', name=_('All types'), title=_('All types'), open=True, isParent=True)
@classmethod @classmethod
def get_tree_nodes(cls, resource_platforms, include_asset=False): def get_tree_nodes(cls, resource_platforms, include_asset=False, get_root=True):
from ..models import Platform from ..models import Platform
platform_count = defaultdict(int) platform_count = defaultdict(int)
for platform_id in resource_platforms: for platform_id in resource_platforms:
@ -239,10 +239,10 @@ class AllTypes(ChoicesMixin):
category_type_mapper[p.category] += platform_count[p.id] category_type_mapper[p.category] += platform_count[p.id]
tp_platforms[p.category + '_' + p.type].append(p) tp_platforms[p.category + '_' + p.type].append(p)
nodes = [cls.get_root_nodes()] nodes = [cls.get_root_nodes()] if get_root else []
for category, type_cls in cls.category_types(): for category, type_cls in cls.category_types():
# Category 格式化 # Category 格式化
meta = {'type': 'category', 'category': category.value} meta = {'type': 'category', 'category': category.value, '_type': category.value}
category_node = cls.choice_to_node(category, 'ROOT', meta=meta) category_node = cls.choice_to_node(category, 'ROOT', meta=meta)
category_count = category_type_mapper.get(category, 0) category_count = category_type_mapper.get(category, 0)
category_node['name'] += f'({category_count})' category_node['name'] += f'({category_count})'

View File

@ -52,7 +52,11 @@ class UserResetPasswordSendCodeApi(CreateAPIView):
other_args = {} other_args = {}
target = serializer.validated_data[form_type] target = serializer.validated_data[form_type]
query_key = 'phone' if form_type == 'sms' else form_type if form_type == 'sms':
query_key = 'phone'
target = target.lstrip('+')
else:
query_key = form_type
user, err = self.is_valid_user(username=username, **{query_key: target}) user, err = self.is_valid_user(username=username, **{query_key: target})
if not user: if not user:
return Response({'error': err}, status=400) return Response({'error': err}, status=400)

View File

@ -1,15 +1,14 @@
import time import time
import requests import requests
import requests.exceptions import requests.exceptions
from django.core.exceptions import MiddlewareNotUsed
from django.conf import settings from django.conf import settings
from django.contrib import auth from django.contrib import auth
from django.core.exceptions import MiddlewareNotUsed
from common.utils import get_logger from common.utils import get_logger
from .utils import validate_and_return_id_token
from .decorator import ssl_verification from .decorator import ssl_verification
from .utils import validate_and_return_id_token
logger = get_logger(__file__) logger = get_logger(__file__)
@ -25,11 +24,16 @@ class OIDCRefreshIDTokenMiddleware:
def __call__(self, request): def __call__(self, request):
# Refreshes tokens only in the applicable cases. # Refreshes tokens only in the applicable cases.
if request.method == 'GET' and not request.is_ajax() and request.user.is_authenticated and settings.AUTH_OPENID: if request.method == 'GET' and not self.is_ajax(request) and \
request.user.is_authenticated and settings.AUTH_OPENID:
self.refresh_token(request) self.refresh_token(request)
response = self.get_response(request) response = self.get_response(request)
return response return response
@staticmethod
def is_ajax(request):
return request.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest'
@ssl_verification @ssl_verification
def refresh_token(self, request): def refresh_token(self, request):
""" Refreshes the token of the current user. """ """ Refreshes the token of the current user. """

View File

@ -191,7 +191,7 @@ class ConnectionToken(JMSOrgBaseModel):
raise JMSException({'error': 'No host account available'}) raise JMSException({'error': 'No host account available'})
host, account, lock_key, ttl = bulk_get(host_account, ('host', 'account', 'lock_key', 'ttl')) host, account, lock_key, ttl = bulk_get(host_account, ('host', 'account', 'lock_key', 'ttl'))
gateway = host.gateway.select_gateway() if host.domain else None gateway = host.domain.select_gateway() if host.domain else None
data = { data = {
'id': account.id, 'id': account.id,

View File

@ -116,9 +116,13 @@ class FeiShu(RequestMixin):
'receive_id_type': 'user_id' 'receive_id_type': 'user_id'
} }
"""
https://open.feishu.cn/document/common-capabilities/message-card/message-cards-content
/using-markdown-tags
"""
body = { body = {
'msg_type': 'text', 'msg_type': 'interactive',
'content': json.dumps({'text': msg}) 'content': json.dumps({'elements': [{'tag': 'markdown', 'content': msg}]})
} }
invalid_users = [] invalid_users = []

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-14 16:56+0800\n" "POT-Creation-Date: 2023-08-10 18:22+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -213,7 +213,7 @@ msgstr "HashiCorp Vault"
#: terminal/serializers/session.py:26 #: terminal/serializers/session.py:26
#: terminal/templates/terminal/_msg_command_warning.html:4 #: terminal/templates/terminal/_msg_command_warning.html:4
#: terminal/templates/terminal/_msg_session_sharing.html:4 #: terminal/templates/terminal/_msg_session_sharing.html:4
#: tickets/models/ticket/apply_asset.py:16 xpack/plugins/cloud/models.py:212 #: tickets/models/ticket/apply_asset.py:16 xpack/plugins/cloud/models.py:253
msgid "Asset" msgid "Asset"
msgstr "資産" msgstr "資産"
@ -248,7 +248,7 @@ msgstr "ソース ID"
#: terminal/backends/command/models.py:18 terminal/models/session/session.py:33 #: terminal/backends/command/models.py:18 terminal/models/session/session.py:33
#: terminal/templates/terminal/_msg_command_warning.html:8 #: terminal/templates/terminal/_msg_command_warning.html:8
#: terminal/templates/terminal/_msg_session_sharing.html:8 #: terminal/templates/terminal/_msg_session_sharing.html:8
#: tickets/models/ticket/command_confirm.py:13 xpack/plugins/cloud/models.py:85 #: tickets/models/ticket/command_confirm.py:13 xpack/plugins/cloud/models.py:89
msgid "Account" msgid "Account"
msgstr "アカウント" msgstr "アカウント"
@ -315,7 +315,7 @@ msgid "Trigger mode"
msgstr "トリガーモード" msgstr "トリガーモード"
#: accounts/models/automations/backup_account.py:105 audits/models.py:194 #: accounts/models/automations/backup_account.py:105 audits/models.py:194
#: terminal/models/session/sharing.py:121 xpack/plugins/cloud/models.py:168 #: terminal/models/session/sharing.py:121 xpack/plugins/cloud/models.py:205
msgid "Reason" msgid "Reason"
msgstr "理由" msgstr "理由"
@ -376,7 +376,6 @@ msgid "Secret type"
msgstr "鍵の種類" msgstr "鍵の種類"
#: accounts/models/automations/change_secret.py:20 #: accounts/models/automations/change_secret.py:20
#: accounts/models/automations/change_secret.py:89
#: accounts/models/mixins/vault.py:48 accounts/serializers/account/base.py:19 #: accounts/models/mixins/vault.py:48 accounts/serializers/account/base.py:19
#: authentication/models/temp_token.py:10 #: authentication/models/temp_token.py:10
#: authentication/templates/authentication/_access_key_modal.html:31 #: authentication/templates/authentication/_access_key_modal.html:31
@ -409,7 +408,11 @@ msgstr "自動暗号化"
#: accounts/models/automations/change_secret.py:88 #: accounts/models/automations/change_secret.py:88
msgid "Old secret" msgid "Old secret"
msgstr "以前のパスワード" msgstr "オリジナルキー"
#: accounts/models/automations/change_secret.py:89
msgid "New secret"
msgstr "新しい鍵"
#: accounts/models/automations/change_secret.py:90 #: accounts/models/automations/change_secret.py:90
msgid "Date started" msgid "Date started"
@ -511,7 +514,8 @@ msgstr "アカウントの確認"
#: terminal/models/component/storage.py:26 terminal/models/component/task.py:13 #: terminal/models/component/storage.py:26 terminal/models/component/task.py:13
#: terminal/models/component/terminal.py:84 users/forms/profile.py:33 #: terminal/models/component/terminal.py:84 users/forms/profile.py:33
#: users/models/group.py:13 users/models/user.py:787 #: users/models/group.py:13 users/models/user.py:787
#: xpack/plugins/cloud/models.py:28 #: xpack/plugins/cloud/models.py:32 xpack/plugins/cloud/models.py:273
#: xpack/plugins/cloud/serializers/task.py:68
msgid "Name" msgid "Name"
msgstr "名前" msgstr "名前"
@ -528,7 +532,7 @@ msgstr "特権アカウント"
msgid "Is active" msgid "Is active"
msgstr "アクティブです。" msgstr "アクティブです。"
#: accounts/models/template.py:19 #: accounts/models/template.py:19 xpack/plugins/cloud/models.py:325
msgid "Account template" msgid "Account template"
msgstr "アカウント テンプレート" msgstr "アカウント テンプレート"
@ -767,7 +771,7 @@ msgstr ""
#: terminal/models/component/endpoint.py:104 #: terminal/models/component/endpoint.py:104
#: terminal/models/session/session.py:46 tickets/models/comment.py:32 #: terminal/models/session/session.py:46 tickets/models/comment.py:32
#: tickets/models/ticket/general.py:297 users/models/user.py:826 #: tickets/models/ticket/general.py:297 users/models/user.py:826
#: xpack/plugins/cloud/models.py:35 xpack/plugins/cloud/models.py:111 #: xpack/plugins/cloud/models.py:39 xpack/plugins/cloud/models.py:109
msgid "Comment" msgid "Comment"
msgstr "コメント" msgstr "コメント"
@ -888,11 +892,13 @@ msgstr "警告"
#: acls/models/base.py:37 assets/models/_user.py:51 #: acls/models/base.py:37 assets/models/_user.py:51
#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:97 #: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:97
#: xpack/plugins/cloud/models.py:275
msgid "Priority" msgid "Priority"
msgstr "優先順位" msgstr "優先順位"
#: acls/models/base.py:38 assets/models/_user.py:51 #: acls/models/base.py:38 assets/models/_user.py:51
#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:98 #: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:98
#: xpack/plugins/cloud/models.py:276
msgid "1-100, the lower the value will be match first" msgid "1-100, the lower the value will be match first"
msgstr "1-100、低い値は最初に一致します" msgstr "1-100、低い値は最初に一致します"
@ -929,6 +935,7 @@ msgid "Command"
msgstr "コマンド" msgstr "コマンド"
#: acls/models/command_acl.py:17 assets/models/cmd_filter.py:59 #: acls/models/command_acl.py:17 assets/models/cmd_filter.py:59
#: xpack/plugins/cloud/models.py:291
msgid "Regex" msgid "Regex"
msgstr "正規情報" msgstr "正規情報"
@ -1025,7 +1032,7 @@ msgid "None of the reviewers belong to Organization `{}`"
msgstr "いずれのレビューアも組織 '{}' に属していません" msgstr "いずれのレビューアも組織 '{}' に属していません"
#: acls/serializers/rules/rules.py:20 #: acls/serializers/rules/rules.py:20
#: xpack/plugins/cloud/serializers/task.py:22 #: xpack/plugins/cloud/serializers/task.py:133
msgid "IP address invalid: `{}`" msgid "IP address invalid: `{}`"
msgstr "IPアドレスが無効: '{}'" msgstr "IPアドレスが無効: '{}'"
@ -1053,7 +1060,7 @@ msgstr "期間"
msgid "Applications" msgid "Applications"
msgstr "アプリケーション" msgstr "アプリケーション"
#: applications/models.py:16 xpack/plugins/cloud/models.py:33 #: applications/models.py:16 xpack/plugins/cloud/models.py:37
#: xpack/plugins/cloud/serializers/account.py:63 #: xpack/plugins/cloud/serializers/account.py:63
msgid "Attrs" msgid "Attrs"
msgstr "ツールバーの" msgstr "ツールバーの"
@ -1451,14 +1458,13 @@ msgstr "アドレス"
#: assets/models/asset/common.py:151 assets/models/platform.py:119 #: assets/models/asset/common.py:151 assets/models/platform.py:119
#: authentication/serializers/connect_token_secret.py:115 #: authentication/serializers/connect_token_secret.py:115
#: perms/serializers/user_permission.py:24 #: perms/serializers/user_permission.py:24 xpack/plugins/cloud/models.py:321
#: xpack/plugins/cloud/serializers/account_attrs.py:196
msgid "Platform" msgid "Platform"
msgstr "プラットフォーム" msgstr "プラットフォーム"
#: assets/models/asset/common.py:153 assets/models/domain.py:21 #: assets/models/asset/common.py:153 assets/models/domain.py:21
#: authentication/serializers/connect_token_secret.py:133 #: authentication/serializers/connect_token_secret.py:133
#: perms/serializers/user_permission.py:29 #: perms/serializers/user_permission.py:29 xpack/plugins/cloud/models.py:323
msgid "Domain" msgid "Domain"
msgstr "ドメイン" msgstr "ドメイン"
@ -1534,8 +1540,8 @@ msgstr "アセットの自動化タスク"
#: terminal/models/component/status.py:30 terminal/serializers/applet.py:18 #: terminal/models/component/status.py:30 terminal/serializers/applet.py:18
#: terminal/serializers/applet_host.py:115 tickets/models/ticket/general.py:283 #: terminal/serializers/applet_host.py:115 tickets/models/ticket/general.py:283
#: tickets/serializers/super_ticket.py:13 #: tickets/serializers/super_ticket.py:13
#: tickets/serializers/ticket/ticket.py:20 xpack/plugins/cloud/models.py:164 #: tickets/serializers/ticket/ticket.py:20 xpack/plugins/cloud/models.py:201
#: xpack/plugins/cloud/models.py:216 #: xpack/plugins/cloud/models.py:257
msgid "Status" msgid "Status"
msgstr "ステータス" msgstr "ステータス"
@ -1599,7 +1605,7 @@ msgstr "資産グループ"
#: assets/models/group.py:31 assets/models/platform.py:19 #: assets/models/group.py:31 assets/models/platform.py:19
#: assets/serializers/platform.py:113 #: assets/serializers/platform.py:113
#: xpack/plugins/cloud/providers/nutanix.py:32 #: xpack/plugins/cloud/providers/nutanix.py:30
msgid "Default" msgid "Default"
msgstr "デフォルト" msgstr "デフォルト"
@ -1649,7 +1655,7 @@ msgid "Parent key"
msgstr "親キー" msgstr "親キー"
#: assets/models/node.py:558 perms/serializers/permission.py:35 #: assets/models/node.py:558 perms/serializers/permission.py:35
#: tickets/models/ticket/apply_asset.py:14 xpack/plugins/cloud/models.py:96 #: tickets/models/ticket/apply_asset.py:14 xpack/plugins/cloud/models.py:322
msgid "Node" msgid "Node"
msgstr "ノード" msgstr "ノード"
@ -1790,7 +1796,8 @@ msgstr ""
#: assets/serializers/asset/common.py:124 assets/serializers/platform.py:129 #: assets/serializers/asset/common.py:124 assets/serializers/platform.py:129
#: authentication/serializers/connect_token_secret.py:29 #: authentication/serializers/connect_token_secret.py:29
#: authentication/serializers/connect_token_secret.py:72 #: authentication/serializers/connect_token_secret.py:72
#: perms/serializers/user_permission.py:25 xpack/plugins/cloud/models.py:99 #: perms/serializers/user_permission.py:25 xpack/plugins/cloud/models.py:324
#: xpack/plugins/cloud/serializers/task.py:31
msgid "Protocols" msgid "Protocols"
msgstr "プロトコル" msgstr "プロトコル"
@ -3739,22 +3746,16 @@ msgid "Python"
msgstr "Python" msgstr "Python"
#: ops/const.py:52 #: ops/const.py:52
#, fuzzy
#| msgid "MySQL port"
msgid "MySQL" msgid "MySQL"
msgstr "MySQL ポート" msgstr "MySQL"
#: ops/const.py:53 #: ops/const.py:53
#, fuzzy
#| msgid "PostgreSQL port"
msgid "PostgreSQL" msgid "PostgreSQL"
msgstr "PostgreSQL ポート" msgstr "PostgreSQL"
#: ops/const.py:54 #: ops/const.py:54
#, fuzzy
#| msgid "Server url"
msgid "SQLServer" msgid "SQLServer"
msgstr "サービス側アドレス" msgstr "SQLServer"
#: ops/const.py:60 #: ops/const.py:60
msgid "Timeout" msgid "Timeout"
@ -3821,7 +3822,7 @@ msgid "Date last run"
msgstr "最終実行日" msgstr "最終実行日"
#: ops/models/base.py:51 ops/models/job.py:217 #: ops/models/base.py:51 ops/models/job.py:217
#: xpack/plugins/cloud/models.py:162 #: xpack/plugins/cloud/models.py:199
msgid "Result" msgid "Result"
msgstr "結果" msgstr "結果"
@ -5172,10 +5173,8 @@ msgstr ""
"はできません。" "はできません。"
#: settings/serializers/security.py:39 #: settings/serializers/security.py:39
#, fuzzy
#| msgid "MFA not enabled"
msgid "Not enabled" msgid "Not enabled"
msgstr "MFAが有効化されていません" msgstr "有効化されていません"
#: settings/serializers/security.py:40 #: settings/serializers/security.py:40
msgid "All users" msgid "All users"
@ -5904,22 +5903,16 @@ msgid "Risk level"
msgstr "リスクレベル" msgstr "リスクレベル"
#: terminal/connect_methods.py:29 #: terminal/connect_methods.py:29
#, fuzzy
#| msgid "Client"
msgid "SSH Client" msgid "SSH Client"
msgstr "クライアント" msgstr "SSH クライアント"
#: terminal/connect_methods.py:30 #: terminal/connect_methods.py:30
#, fuzzy
#| msgid "SSH key"
msgid "SSH Guide" msgid "SSH Guide"
msgstr "SSH キー" msgstr "SSH ガイド人"
#: terminal/connect_methods.py:31 #: terminal/connect_methods.py:31
#, fuzzy
#| msgid "Client"
msgid "SFTP Client" msgid "SFTP Client"
msgstr "クライアント" msgstr "SFTP クライアント"
#: terminal/connect_methods.py:33 #: terminal/connect_methods.py:33
msgid "DB Guide" msgid "DB Guide"
@ -5930,10 +5923,8 @@ msgid "DB Client"
msgstr "データベース クライアント" msgstr "データベース クライアント"
#: terminal/connect_methods.py:36 #: terminal/connect_methods.py:36
#, fuzzy
#| msgid "Remote Address"
msgid "Remote Desktop" msgid "Remote Desktop"
msgstr "リモートアドレス" msgstr "リモートデスクトップ"
#: terminal/const.py:12 #: terminal/const.py:12
msgid "Review & Reject" msgid "Review & Reject"
@ -6540,7 +6531,7 @@ msgstr "アクセスキー"
msgid "Access key secret" msgid "Access key secret"
msgstr "アクセスキーシークレット" msgstr "アクセスキーシークレット"
#: terminal/serializers/storage.py:67 xpack/plugins/cloud/models.py:209 #: terminal/serializers/storage.py:67 xpack/plugins/cloud/models.py:250
msgid "Region" msgid "Region"
msgstr "リージョン" msgstr "リージョン"
@ -7102,7 +7093,7 @@ msgid "Not a valid ssh public key"
msgstr "有効なssh公開鍵ではありません" msgstr "有効なssh公開鍵ではありません"
#: users/forms/profile.py:173 users/models/user.py:820 #: users/forms/profile.py:173 users/models/user.py:820
#: xpack/plugins/cloud/serializers/account_attrs.py:206 #: xpack/plugins/cloud/serializers/account_attrs.py:203
msgid "Public key" msgid "Public key"
msgstr "公開キー" msgstr "公開キー"
@ -7131,7 +7122,7 @@ msgid "OTP secret key"
msgstr "OTP 秘密" msgstr "OTP 秘密"
#: users/models/user.py:817 #: users/models/user.py:817
#: xpack/plugins/cloud/serializers/account_attrs.py:209 #: xpack/plugins/cloud/serializers/account_attrs.py:206
msgid "Private key" msgid "Private key"
msgstr "ssh秘密鍵" msgstr "ssh秘密鍵"
@ -7570,11 +7561,11 @@ msgstr "パスワードの成功をリセットし、ログインページに戻
msgid "XPACK" msgid "XPACK"
msgstr "XPack" msgstr "XPack"
#: xpack/plugins/cloud/api.py:38 #: xpack/plugins/cloud/api.py:56
msgid "Test connection successful" msgid "Test connection successful"
msgstr "テスト接続成功" msgstr "テスト接続成功"
#: xpack/plugins/cloud/api.py:40 #: xpack/plugins/cloud/api.py:58
msgid "Test connection failed: {}" msgid "Test connection failed: {}"
msgstr "テスト接続に失敗しました: {}" msgstr "テスト接続に失敗しました: {}"
@ -7662,7 +7653,7 @@ msgstr "プライベートIP"
msgid "Public IP" msgid "Public IP"
msgstr "パブリックIP" msgstr "パブリックIP"
#: xpack/plugins/cloud/const.py:38 #: xpack/plugins/cloud/const.py:38 xpack/plugins/cloud/models.py:295
msgid "Instance name" msgid "Instance name"
msgstr "インスタンス名" msgstr "インスタンス名"
@ -7690,78 +7681,158 @@ msgstr "同期済み"
msgid "Released" msgid "Released"
msgstr "リリース済み" msgstr "リリース済み"
#: xpack/plugins/cloud/manager.py:53
msgid "Account unavailable"
msgstr "利用できないアカウント"
#: xpack/plugins/cloud/meta.py:9 #: xpack/plugins/cloud/meta.py:9
msgid "Cloud center" msgid "Cloud center"
msgstr "クラウドセンター" msgstr "クラウドセンター"
#: xpack/plugins/cloud/models.py:30 #: xpack/plugins/cloud/models.py:34
msgid "Provider" msgid "Provider"
msgstr "プロバイダー" msgstr "プロバイダー"
#: xpack/plugins/cloud/models.py:34 #: xpack/plugins/cloud/models.py:38
msgid "Validity" msgid "Validity"
msgstr "有効性" msgstr "有効性"
#: xpack/plugins/cloud/models.py:39 #: xpack/plugins/cloud/models.py:43
msgid "Cloud account" msgid "Cloud account"
msgstr "クラウドアカウント" msgstr "クラウドアカウント"
#: xpack/plugins/cloud/models.py:41 #: xpack/plugins/cloud/models.py:45
msgid "Test cloud account" msgid "Test cloud account"
msgstr "クラウドアカウントのテスト" msgstr "クラウドアカウントのテスト"
#: xpack/plugins/cloud/models.py:88 xpack/plugins/cloud/serializers/task.py:36 #: xpack/plugins/cloud/models.py:92 xpack/plugins/cloud/serializers/task.py:147
msgid "Regions" msgid "Regions"
msgstr "リージョン" msgstr "リージョン"
#: xpack/plugins/cloud/models.py:91 #: xpack/plugins/cloud/models.py:95
msgid "Hostname strategy" msgid "Hostname strategy"
msgstr "ホスト名戦略" msgstr "ホスト名戦略"
#: xpack/plugins/cloud/models.py:102 xpack/plugins/cloud/serializers/task.py:39 #: xpack/plugins/cloud/models.py:100
#: xpack/plugins/cloud/serializers/task.py:150
msgid "IP network segment group" msgid "IP network segment group"
msgstr "IPネットワークセグメントグループ" msgstr "IPネットワークセグメントグループ"
#: xpack/plugins/cloud/models.py:105 xpack/plugins/cloud/serializers/task.py:44 #: xpack/plugins/cloud/models.py:103
#: xpack/plugins/cloud/serializers/task.py:155
msgid "Sync IP type" msgid "Sync IP type"
msgstr "同期IPタイプ" msgstr "同期IPタイプ"
#: xpack/plugins/cloud/models.py:108 xpack/plugins/cloud/serializers/task.py:61 #: xpack/plugins/cloud/models.py:106
#: xpack/plugins/cloud/serializers/task.py:173
msgid "Always update" msgid "Always update"
msgstr "常に更新" msgstr "常に更新"
#: xpack/plugins/cloud/models.py:114 #: xpack/plugins/cloud/models.py:112
msgid "Date last sync" msgid "Date last sync"
msgstr "最終同期日" msgstr "最終同期日"
#: xpack/plugins/cloud/models.py:119 xpack/plugins/cloud/models.py:160 #: xpack/plugins/cloud/models.py:115 xpack/plugins/cloud/models.py:313
#: xpack/plugins/cloud/models.py:337
msgid "Strategy"
msgstr "戦略"
#: xpack/plugins/cloud/models.py:120 xpack/plugins/cloud/models.py:197
msgid "Sync instance task" msgid "Sync instance task"
msgstr "インスタンスの同期タスク" msgstr "インスタンスの同期タスク"
#: xpack/plugins/cloud/models.py:171 xpack/plugins/cloud/models.py:219 #: xpack/plugins/cloud/models.py:208 xpack/plugins/cloud/models.py:260
msgid "Date sync" msgid "Date sync"
msgstr "日付の同期" msgstr "日付の同期"
#: xpack/plugins/cloud/models.py:175 #: xpack/plugins/cloud/models.py:212
msgid "Sync instance snapshot"
msgstr "インスタンススナップショットの同期"
#: xpack/plugins/cloud/models.py:216
msgid "Sync instance task execution" msgid "Sync instance task execution"
msgstr "インスタンスタスクの同期実行" msgstr "インスタンスタスクの同期実行"
#: xpack/plugins/cloud/models.py:199 #: xpack/plugins/cloud/models.py:240
msgid "Sync task" msgid "Sync task"
msgstr "同期タスク" msgstr "同期タスク"
#: xpack/plugins/cloud/models.py:203 #: xpack/plugins/cloud/models.py:244
msgid "Sync instance task history" msgid "Sync instance task history"
msgstr "インスタンスタスク履歴の同期" msgstr "インスタンスタスク履歴の同期"
#: xpack/plugins/cloud/models.py:206 #: xpack/plugins/cloud/models.py:247
msgid "Instance" msgid "Instance"
msgstr "インスタンス" msgstr "インスタンス"
#: xpack/plugins/cloud/models.py:223 #: xpack/plugins/cloud/models.py:264
msgid "Sync instance detail" msgid "Sync instance detail"
msgstr "同期インスタンスの詳細" msgstr "同期インスタンスの詳細"
#: xpack/plugins/cloud/models.py:281
msgid "Task strategy"
msgstr "ミッション戦略です"
#: xpack/plugins/cloud/models.py:285
msgid "Exact"
msgstr ""
#: xpack/plugins/cloud/models.py:286
msgid "Not"
msgstr "否"
#: xpack/plugins/cloud/models.py:287
msgid "In"
msgstr "イン"
#: xpack/plugins/cloud/models.py:288
msgid "Contains"
msgstr "含む"
#: xpack/plugins/cloud/models.py:289
msgid "Startswith"
msgstr "始まる"
#: xpack/plugins/cloud/models.py:290
msgid "Endswith"
msgstr "終わる"
#: xpack/plugins/cloud/models.py:296
msgid "Instance platform"
msgstr "インスタンス名"
#: xpack/plugins/cloud/models.py:297
msgid "Instance address"
msgstr "インスタンスアドレス"
#: xpack/plugins/cloud/models.py:304
msgid "Rule attr"
msgstr "ルール属性"
#: xpack/plugins/cloud/models.py:308
msgid "Rule match"
msgstr "ルール一致"
#: xpack/plugins/cloud/models.py:310
msgid "Rule value"
msgstr "ルール値"
#: xpack/plugins/cloud/models.py:317
msgid "Strategy rule"
msgstr "戦略ルール"
#: xpack/plugins/cloud/models.py:332
msgid "Action attr"
msgstr "アクション属性"
#: xpack/plugins/cloud/models.py:334
msgid "Action value"
msgstr "アクション値"
#: xpack/plugins/cloud/models.py:341
msgid "Strategy action"
msgstr "戦略アクション"
#: xpack/plugins/cloud/providers/aws_international.py:18 #: xpack/plugins/cloud/providers/aws_international.py:18
msgid "China (Beijing)" msgid "China (Beijing)"
msgstr "中国 (北京)" msgstr "中国 (北京)"
@ -7870,7 +7941,7 @@ msgid "CN East-Suzhou"
msgstr "華東-蘇州" msgstr "華東-蘇州"
#: xpack/plugins/cloud/providers/baiducloud.py:57 #: xpack/plugins/cloud/providers/baiducloud.py:57
#: xpack/plugins/cloud/providers/huaweicloud.py:50 #: xpack/plugins/cloud/providers/huaweicloud.py:49
msgid "CN-Hong Kong" msgid "CN-Hong Kong"
msgstr "中国-香港" msgstr "中国-香港"
@ -7888,66 +7959,66 @@ msgid "CN East-Shanghai"
msgstr "華東-上海" msgstr "華東-上海"
#: xpack/plugins/cloud/providers/baiducloud.py:61 #: xpack/plugins/cloud/providers/baiducloud.py:61
#: xpack/plugins/cloud/providers/huaweicloud.py:49 #: xpack/plugins/cloud/providers/huaweicloud.py:51
msgid "AP-Singapore" msgid "AP-Singapore"
msgstr "アジア太平洋-シンガポール" msgstr "アジア太平洋-シンガポール"
#: xpack/plugins/cloud/providers/huaweicloud.py:37
msgid "AF-Johannesburg"
msgstr "アフリカ-ヨハネスブルク"
#: xpack/plugins/cloud/providers/huaweicloud.py:38
msgid "CN North-Beijing4"
msgstr "華北-北京4"
#: xpack/plugins/cloud/providers/huaweicloud.py:39 #: xpack/plugins/cloud/providers/huaweicloud.py:39
msgid "CN North-Beijing1" msgid "CN North-Beijing1"
msgstr "華北-北京1" msgstr "華北-北京1"
#: xpack/plugins/cloud/providers/huaweicloud.py:40 #: xpack/plugins/cloud/providers/huaweicloud.py:40
msgid "CN East-Shanghai2" msgid "CN North-Beijing4"
msgstr "華東-上海2" msgstr "華北-北京4"
#: xpack/plugins/cloud/providers/huaweicloud.py:41 #: xpack/plugins/cloud/providers/huaweicloud.py:41
msgid "CN East-Shanghai1"
msgstr "華東-上海1"
#: xpack/plugins/cloud/providers/huaweicloud.py:43
msgid "LA-Mexico City1"
msgstr "LA-メキシコCity1"
#: xpack/plugins/cloud/providers/huaweicloud.py:44
msgid "LA-Santiago"
msgstr "ラテンアメリカ-サンディエゴ"
#: xpack/plugins/cloud/providers/huaweicloud.py:45
msgid "LA-Sao Paulo1"
msgstr "ラミー・サンパウロ1"
#: xpack/plugins/cloud/providers/huaweicloud.py:46
msgid "EU-Paris"
msgstr "ヨーロッパ-パリ"
#: xpack/plugins/cloud/providers/huaweicloud.py:47
msgid "CN Southwest-Guiyang1"
msgstr "南西-貴陽1"
#: xpack/plugins/cloud/providers/huaweicloud.py:48
msgid "AP-Bangkok"
msgstr "アジア太平洋-バンコク"
#: xpack/plugins/cloud/providers/huaweicloud.py:52
msgid "CN Northeast-Dalian"
msgstr "华北-大连"
#: xpack/plugins/cloud/providers/huaweicloud.py:53
msgid "CN North-Ulanqab1" msgid "CN North-Ulanqab1"
msgstr "華北-ウランチャブ一" msgstr "華北-ウランチャブ一"
#: xpack/plugins/cloud/providers/huaweicloud.py:54 #: xpack/plugins/cloud/providers/huaweicloud.py:43
msgid "CN South-Shenzhen"
msgstr "華南-広州"
#: xpack/plugins/cloud/providers/huaweicloud.py:44
msgid "CN South-Guangzhou-InvitationOnly" msgid "CN South-Guangzhou-InvitationOnly"
msgstr "華南-広州-友好ユーザー環境" msgstr "華南-広州-友好ユーザー環境"
#: xpack/plugins/cloud/providers/huaweicloud.py:45
msgid "CN East-Shanghai2"
msgstr "華東-上海2"
#: xpack/plugins/cloud/providers/huaweicloud.py:46
msgid "CN East-Shanghai1"
msgstr "華東-上海1"
#: xpack/plugins/cloud/providers/huaweicloud.py:48
msgid "CN Southwest-Guiyang1"
msgstr "南西-貴陽1"
#: xpack/plugins/cloud/providers/huaweicloud.py:50
msgid "AP-Bangkok"
msgstr "アジア太平洋-バンコク"
#: xpack/plugins/cloud/providers/huaweicloud.py:53
msgid "AF-Johannesburg"
msgstr "アフリカ-ヨハネスブルク"
#: xpack/plugins/cloud/providers/huaweicloud.py:54
msgid "LA-Mexico City1"
msgstr "LA-メキシコCity1"
#: xpack/plugins/cloud/providers/huaweicloud.py:55
msgid "LA-Santiago"
msgstr "ラテンアメリカ-サンディエゴ"
#: xpack/plugins/cloud/providers/huaweicloud.py:56
msgid "LA-Sao Paulo1"
msgstr "ラミー・サンパウロ1"
#: xpack/plugins/cloud/providers/huaweicloud.py:58
msgid "TR-Istanbul"
msgstr ""
#: xpack/plugins/cloud/providers/jdcloud.py:126 #: xpack/plugins/cloud/providers/jdcloud.py:126
msgid "CN East-Suqian" msgid "CN East-Suqian"
msgstr "華東-宿遷" msgstr "華東-宿遷"
@ -7976,7 +8047,7 @@ msgstr "サブスクリプションID"
#: xpack/plugins/cloud/serializers/account_attrs.py:103 #: xpack/plugins/cloud/serializers/account_attrs.py:103
#: xpack/plugins/cloud/serializers/account_attrs.py:119 #: xpack/plugins/cloud/serializers/account_attrs.py:119
#: xpack/plugins/cloud/serializers/account_attrs.py:149 #: xpack/plugins/cloud/serializers/account_attrs.py:149
#: xpack/plugins/cloud/serializers/account_attrs.py:202 #: xpack/plugins/cloud/serializers/account_attrs.py:199
msgid "API Endpoint" msgid "API Endpoint"
msgstr "APIエンドポイント" msgstr "APIエンドポイント"
@ -8042,11 +8113,11 @@ msgstr "テストポート"
msgid "Test timeout" msgid "Test timeout"
msgstr "テストタイムアウト" msgstr "テストタイムアウト"
#: xpack/plugins/cloud/serializers/account_attrs.py:212 #: xpack/plugins/cloud/serializers/account_attrs.py:209
msgid "Project" msgid "Project"
msgstr "project" msgstr "project"
#: xpack/plugins/cloud/serializers/task.py:28 #: xpack/plugins/cloud/serializers/task.py:139
msgid "" msgid ""
"Only instances matching the IP range will be synced. <br>If the instance " "Only instances matching the IP range will be synced. <br>If the instance "
"contains multiple IP addresses, the first IP address that matches will be " "contains multiple IP addresses, the first IP address that matches will be "
@ -8060,11 +8131,11 @@ msgstr ""
"ドレスをランダムに一致させることを意味します。 <br> 例: " "ドレスをランダムに一致させることを意味します。 <br> 例: "
"192.168.1.0/24,10.1.1.1-10.1.1.20。" "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:145
msgid "History count" msgid "History count"
msgstr "実行回数" msgstr "実行回数"
#: xpack/plugins/cloud/serializers/task.py:35 #: xpack/plugins/cloud/serializers/task.py:146
msgid "Instance count" msgid "Instance count"
msgstr "インスタンス数" msgstr "インスタンス数"
@ -8076,10 +8147,6 @@ msgstr "同期インスタンス タスクを実行する"
msgid "Period clean sync instance task execution" msgid "Period clean sync instance task execution"
msgstr "同期インスタンス タスクの実行記録を定期的にクリアする" msgstr "同期インスタンス タスクの実行記録を定期的にクリアする"
#: xpack/plugins/cloud/utils.py:68
msgid "Account unavailable"
msgstr "利用できないアカウント"
#: xpack/plugins/interface/api.py:52 #: xpack/plugins/interface/api.py:52
msgid "Restore default successfully." msgid "Restore default successfully."
msgstr "デフォルトの復元に成功しました。" msgstr "デフォルトの復元に成功しました。"
@ -8144,9 +8211,6 @@ msgstr "究極のエディション"
msgid "Community edition" msgid "Community edition"
msgstr "コミュニティ版" msgstr "コミュニティ版"
#~ msgid "eg: http://dev.jumpserver.org:8080"
#~ msgstr "例えば: http://dev.jumpserver.org:8080"
#~ msgid "Strategy" #~ msgid "Strategy"
#~ msgstr "戦略" #~ msgstr "戦略"
@ -8195,11 +8259,8 @@ msgstr "コミュニティ版"
#~ msgid "Action value" #~ msgid "Action value"
#~ msgstr "アクション値" #~ msgstr "アクション値"
#~ msgid "Strategy action" #~ msgid "CN Northeast-Dalian"
#~ msgstr "戦略アクション" #~ msgstr "华北-大连"
#~ msgid "CN South-Shenzhen"
#~ msgstr "華南-広州"
#~ msgid "Current only support login from AD/LDAP" #~ msgid "Current only support login from AD/LDAP"
#~ msgstr "現在、AD/LDAPからのログインのみサポートしています" #~ msgstr "現在、AD/LDAPからのログインのみサポートしています"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n" "Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-14 16:56+0800\n" "POT-Creation-Date: 2023-08-10 18:22+0800\n"
"PO-Revision-Date: 2021-05-20 10:54+0800\n" "PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler <ibuler@qq.com>\n" "Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n" "Language-Team: JumpServer team<ibuler@qq.com>\n"
@ -212,7 +212,7 @@ msgstr "HashiCorp Vault"
#: terminal/serializers/session.py:26 #: terminal/serializers/session.py:26
#: terminal/templates/terminal/_msg_command_warning.html:4 #: terminal/templates/terminal/_msg_command_warning.html:4
#: terminal/templates/terminal/_msg_session_sharing.html:4 #: terminal/templates/terminal/_msg_session_sharing.html:4
#: tickets/models/ticket/apply_asset.py:16 xpack/plugins/cloud/models.py:212 #: tickets/models/ticket/apply_asset.py:16 xpack/plugins/cloud/models.py:253
msgid "Asset" msgid "Asset"
msgstr "资产" msgstr "资产"
@ -247,7 +247,7 @@ msgstr "来源 ID"
#: terminal/backends/command/models.py:18 terminal/models/session/session.py:33 #: terminal/backends/command/models.py:18 terminal/models/session/session.py:33
#: terminal/templates/terminal/_msg_command_warning.html:8 #: terminal/templates/terminal/_msg_command_warning.html:8
#: terminal/templates/terminal/_msg_session_sharing.html:8 #: terminal/templates/terminal/_msg_session_sharing.html:8
#: tickets/models/ticket/command_confirm.py:13 xpack/plugins/cloud/models.py:85 #: tickets/models/ticket/command_confirm.py:13 xpack/plugins/cloud/models.py:89
msgid "Account" msgid "Account"
msgstr "账号" msgstr "账号"
@ -314,7 +314,7 @@ msgid "Trigger mode"
msgstr "触发模式" msgstr "触发模式"
#: accounts/models/automations/backup_account.py:105 audits/models.py:194 #: accounts/models/automations/backup_account.py:105 audits/models.py:194
#: terminal/models/session/sharing.py:121 xpack/plugins/cloud/models.py:168 #: terminal/models/session/sharing.py:121 xpack/plugins/cloud/models.py:205
msgid "Reason" msgid "Reason"
msgstr "原因" msgstr "原因"
@ -375,7 +375,6 @@ msgid "Secret type"
msgstr "密文类型" msgstr "密文类型"
#: accounts/models/automations/change_secret.py:20 #: accounts/models/automations/change_secret.py:20
#: accounts/models/automations/change_secret.py:89
#: accounts/models/mixins/vault.py:48 accounts/serializers/account/base.py:19 #: accounts/models/mixins/vault.py:48 accounts/serializers/account/base.py:19
#: authentication/models/temp_token.py:10 #: authentication/models/temp_token.py:10
#: authentication/templates/authentication/_access_key_modal.html:31 #: authentication/templates/authentication/_access_key_modal.html:31
@ -408,7 +407,11 @@ msgstr "自动化改密"
#: accounts/models/automations/change_secret.py:88 #: accounts/models/automations/change_secret.py:88
msgid "Old secret" msgid "Old secret"
msgstr "原密码" msgstr "原密钥"
#: accounts/models/automations/change_secret.py:89
msgid "New secret"
msgstr "新密钥"
#: accounts/models/automations/change_secret.py:90 #: accounts/models/automations/change_secret.py:90
msgid "Date started" msgid "Date started"
@ -510,7 +513,8 @@ msgstr "账号验证"
#: terminal/models/component/storage.py:26 terminal/models/component/task.py:13 #: terminal/models/component/storage.py:26 terminal/models/component/task.py:13
#: terminal/models/component/terminal.py:84 users/forms/profile.py:33 #: terminal/models/component/terminal.py:84 users/forms/profile.py:33
#: users/models/group.py:13 users/models/user.py:787 #: users/models/group.py:13 users/models/user.py:787
#: xpack/plugins/cloud/models.py:28 #: xpack/plugins/cloud/models.py:32 xpack/plugins/cloud/models.py:273
#: xpack/plugins/cloud/serializers/task.py:68
msgid "Name" msgid "Name"
msgstr "名称" msgstr "名称"
@ -527,7 +531,7 @@ msgstr "特权账号"
msgid "Is active" msgid "Is active"
msgstr "激活" msgstr "激活"
#: accounts/models/template.py:19 #: accounts/models/template.py:19 xpack/plugins/cloud/models.py:325
msgid "Account template" msgid "Account template"
msgstr "账号模版" msgstr "账号模版"
@ -767,7 +771,7 @@ msgstr ""
#: terminal/models/component/endpoint.py:104 #: terminal/models/component/endpoint.py:104
#: terminal/models/session/session.py:46 tickets/models/comment.py:32 #: terminal/models/session/session.py:46 tickets/models/comment.py:32
#: tickets/models/ticket/general.py:297 users/models/user.py:826 #: tickets/models/ticket/general.py:297 users/models/user.py:826
#: xpack/plugins/cloud/models.py:35 xpack/plugins/cloud/models.py:111 #: xpack/plugins/cloud/models.py:39 xpack/plugins/cloud/models.py:109
msgid "Comment" msgid "Comment"
msgstr "备注" msgstr "备注"
@ -888,11 +892,13 @@ msgstr "告警"
#: acls/models/base.py:37 assets/models/_user.py:51 #: acls/models/base.py:37 assets/models/_user.py:51
#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:97 #: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:97
#: xpack/plugins/cloud/models.py:275
msgid "Priority" msgid "Priority"
msgstr "优先级" msgstr "优先级"
#: acls/models/base.py:38 assets/models/_user.py:51 #: acls/models/base.py:38 assets/models/_user.py:51
#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:98 #: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:98
#: xpack/plugins/cloud/models.py:276
msgid "1-100, the lower the value will be match first" msgid "1-100, the lower the value will be match first"
msgstr "优先级可选范围为 1-100 (数值越小越优先)" msgstr "优先级可选范围为 1-100 (数值越小越优先)"
@ -929,6 +935,7 @@ msgid "Command"
msgstr "命令" msgstr "命令"
#: acls/models/command_acl.py:17 assets/models/cmd_filter.py:59 #: acls/models/command_acl.py:17 assets/models/cmd_filter.py:59
#: xpack/plugins/cloud/models.py:291
msgid "Regex" msgid "Regex"
msgstr "正则表达式" msgstr "正则表达式"
@ -1024,7 +1031,7 @@ msgid "None of the reviewers belong to Organization `{}`"
msgstr "所有复核人都不属于组织 `{}`" msgstr "所有复核人都不属于组织 `{}`"
#: acls/serializers/rules/rules.py:20 #: acls/serializers/rules/rules.py:20
#: xpack/plugins/cloud/serializers/task.py:22 #: xpack/plugins/cloud/serializers/task.py:133
msgid "IP address invalid: `{}`" msgid "IP address invalid: `{}`"
msgstr "IP 地址无效: `{}`" msgstr "IP 地址无效: `{}`"
@ -1052,7 +1059,7 @@ msgstr "时段"
msgid "Applications" msgid "Applications"
msgstr "应用管理" msgstr "应用管理"
#: applications/models.py:16 xpack/plugins/cloud/models.py:33 #: applications/models.py:16 xpack/plugins/cloud/models.py:37
#: xpack/plugins/cloud/serializers/account.py:63 #: xpack/plugins/cloud/serializers/account.py:63
msgid "Attrs" msgid "Attrs"
msgstr "属性" msgstr "属性"
@ -1449,14 +1456,13 @@ msgstr "地址"
#: assets/models/asset/common.py:151 assets/models/platform.py:119 #: assets/models/asset/common.py:151 assets/models/platform.py:119
#: authentication/serializers/connect_token_secret.py:115 #: authentication/serializers/connect_token_secret.py:115
#: perms/serializers/user_permission.py:24 #: perms/serializers/user_permission.py:24 xpack/plugins/cloud/models.py:321
#: xpack/plugins/cloud/serializers/account_attrs.py:196
msgid "Platform" msgid "Platform"
msgstr "系统平台" msgstr "系统平台"
#: assets/models/asset/common.py:153 assets/models/domain.py:21 #: assets/models/asset/common.py:153 assets/models/domain.py:21
#: authentication/serializers/connect_token_secret.py:133 #: authentication/serializers/connect_token_secret.py:133
#: perms/serializers/user_permission.py:29 #: perms/serializers/user_permission.py:29 xpack/plugins/cloud/models.py:323
msgid "Domain" msgid "Domain"
msgstr "网域" msgstr "网域"
@ -1532,8 +1538,8 @@ msgstr "资产自动化任务"
#: terminal/models/component/status.py:30 terminal/serializers/applet.py:18 #: terminal/models/component/status.py:30 terminal/serializers/applet.py:18
#: terminal/serializers/applet_host.py:115 tickets/models/ticket/general.py:283 #: terminal/serializers/applet_host.py:115 tickets/models/ticket/general.py:283
#: tickets/serializers/super_ticket.py:13 #: tickets/serializers/super_ticket.py:13
#: tickets/serializers/ticket/ticket.py:20 xpack/plugins/cloud/models.py:164 #: tickets/serializers/ticket/ticket.py:20 xpack/plugins/cloud/models.py:201
#: xpack/plugins/cloud/models.py:216 #: xpack/plugins/cloud/models.py:257
msgid "Status" msgid "Status"
msgstr "状态" msgstr "状态"
@ -1597,7 +1603,7 @@ msgstr "资产组"
#: assets/models/group.py:31 assets/models/platform.py:19 #: assets/models/group.py:31 assets/models/platform.py:19
#: assets/serializers/platform.py:113 #: assets/serializers/platform.py:113
#: xpack/plugins/cloud/providers/nutanix.py:32 #: xpack/plugins/cloud/providers/nutanix.py:30
msgid "Default" msgid "Default"
msgstr "默认" msgstr "默认"
@ -1647,7 +1653,7 @@ msgid "Parent key"
msgstr "ssh私钥" msgstr "ssh私钥"
#: assets/models/node.py:558 perms/serializers/permission.py:35 #: assets/models/node.py:558 perms/serializers/permission.py:35
#: tickets/models/ticket/apply_asset.py:14 xpack/plugins/cloud/models.py:96 #: tickets/models/ticket/apply_asset.py:14 xpack/plugins/cloud/models.py:322
msgid "Node" msgid "Node"
msgstr "节点" msgstr "节点"
@ -1786,7 +1792,8 @@ msgstr "资产中批量更新平台,不符合平台类型跳过的资产"
#: assets/serializers/asset/common.py:124 assets/serializers/platform.py:129 #: assets/serializers/asset/common.py:124 assets/serializers/platform.py:129
#: authentication/serializers/connect_token_secret.py:29 #: authentication/serializers/connect_token_secret.py:29
#: authentication/serializers/connect_token_secret.py:72 #: authentication/serializers/connect_token_secret.py:72
#: perms/serializers/user_permission.py:25 xpack/plugins/cloud/models.py:99 #: perms/serializers/user_permission.py:25 xpack/plugins/cloud/models.py:324
#: xpack/plugins/cloud/serializers/task.py:31
msgid "Protocols" msgid "Protocols"
msgstr "协议组" msgstr "协议组"
@ -3773,7 +3780,7 @@ msgid "Date last run"
msgstr "最后运行日期" msgstr "最后运行日期"
#: ops/models/base.py:51 ops/models/job.py:217 #: ops/models/base.py:51 ops/models/job.py:217
#: xpack/plugins/cloud/models.py:162 #: xpack/plugins/cloud/models.py:199
msgid "Result" msgid "Result"
msgstr "结果" msgstr "结果"
@ -6416,7 +6423,7 @@ msgstr "Access key ID(AK)"
msgid "Access key secret" msgid "Access key secret"
msgstr "Access key secret(SK)" msgstr "Access key secret(SK)"
#: terminal/serializers/storage.py:67 xpack/plugins/cloud/models.py:209 #: terminal/serializers/storage.py:67 xpack/plugins/cloud/models.py:250
msgid "Region" msgid "Region"
msgstr "地域" msgstr "地域"
@ -6972,7 +6979,7 @@ msgid "Not a valid ssh public key"
msgstr "SSH密钥不合法" msgstr "SSH密钥不合法"
#: users/forms/profile.py:173 users/models/user.py:820 #: users/forms/profile.py:173 users/models/user.py:820
#: xpack/plugins/cloud/serializers/account_attrs.py:206 #: xpack/plugins/cloud/serializers/account_attrs.py:203
msgid "Public key" msgid "Public key"
msgstr "SSH公钥" msgstr "SSH公钥"
@ -7001,7 +7008,7 @@ msgid "OTP secret key"
msgstr "OTP 密钥" msgstr "OTP 密钥"
#: users/models/user.py:817 #: users/models/user.py:817
#: xpack/plugins/cloud/serializers/account_attrs.py:209 #: xpack/plugins/cloud/serializers/account_attrs.py:206
msgid "Private key" msgid "Private key"
msgstr "ssh私钥" msgstr "ssh私钥"
@ -7427,11 +7434,11 @@ msgstr "重置密码成功,返回到登录页面"
msgid "XPACK" msgid "XPACK"
msgstr "XPack" msgstr "XPack"
#: xpack/plugins/cloud/api.py:38 #: xpack/plugins/cloud/api.py:56
msgid "Test connection successful" msgid "Test connection successful"
msgstr "测试成功" msgstr "测试成功"
#: xpack/plugins/cloud/api.py:40 #: xpack/plugins/cloud/api.py:58
msgid "Test connection failed: {}" msgid "Test connection failed: {}"
msgstr "测试连接失败:{}" msgstr "测试连接失败:{}"
@ -7519,7 +7526,7 @@ msgstr "私有IP"
msgid "Public IP" msgid "Public IP"
msgstr "公网IP" msgstr "公网IP"
#: xpack/plugins/cloud/const.py:38 #: xpack/plugins/cloud/const.py:38 xpack/plugins/cloud/models.py:295
msgid "Instance name" msgid "Instance name"
msgstr "实例名称" msgstr "实例名称"
@ -7547,78 +7554,158 @@ msgstr "已同步"
msgid "Released" msgid "Released"
msgstr "已释放" msgstr "已释放"
#: xpack/plugins/cloud/manager.py:53
msgid "Account unavailable"
msgstr "账号无效"
#: xpack/plugins/cloud/meta.py:9 #: xpack/plugins/cloud/meta.py:9
msgid "Cloud center" msgid "Cloud center"
msgstr "云管中心" msgstr "云管中心"
#: xpack/plugins/cloud/models.py:30 #: xpack/plugins/cloud/models.py:34
msgid "Provider" msgid "Provider"
msgstr "云服务商" msgstr "云服务商"
#: xpack/plugins/cloud/models.py:34 #: xpack/plugins/cloud/models.py:38
msgid "Validity" msgid "Validity"
msgstr "有效" msgstr "有效"
#: xpack/plugins/cloud/models.py:39 #: xpack/plugins/cloud/models.py:43
msgid "Cloud account" msgid "Cloud account"
msgstr "云账号" msgstr "云账号"
#: xpack/plugins/cloud/models.py:41 #: xpack/plugins/cloud/models.py:45
msgid "Test cloud account" msgid "Test cloud account"
msgstr "测试云账号" msgstr "测试云账号"
#: xpack/plugins/cloud/models.py:88 xpack/plugins/cloud/serializers/task.py:36 #: xpack/plugins/cloud/models.py:92 xpack/plugins/cloud/serializers/task.py:147
msgid "Regions" msgid "Regions"
msgstr "地域" msgstr "地域"
#: xpack/plugins/cloud/models.py:91 #: xpack/plugins/cloud/models.py:95
msgid "Hostname strategy" msgid "Hostname strategy"
msgstr "主机名策略" msgstr "主机名策略"
#: xpack/plugins/cloud/models.py:102 xpack/plugins/cloud/serializers/task.py:39 #: xpack/plugins/cloud/models.py:100
#: xpack/plugins/cloud/serializers/task.py:150
msgid "IP network segment group" msgid "IP network segment group"
msgstr "IP网段组" msgstr "IP网段组"
#: xpack/plugins/cloud/models.py:105 xpack/plugins/cloud/serializers/task.py:44 #: xpack/plugins/cloud/models.py:103
#: xpack/plugins/cloud/serializers/task.py:155
msgid "Sync IP type" msgid "Sync IP type"
msgstr "同步IP类型" msgstr "同步IP类型"
#: xpack/plugins/cloud/models.py:108 xpack/plugins/cloud/serializers/task.py:61 #: xpack/plugins/cloud/models.py:106
#: xpack/plugins/cloud/serializers/task.py:173
msgid "Always update" msgid "Always update"
msgstr "总是更新" msgstr "总是更新"
#: xpack/plugins/cloud/models.py:114 #: xpack/plugins/cloud/models.py:112
msgid "Date last sync" msgid "Date last sync"
msgstr "最后同步日期" msgstr "最后同步日期"
#: xpack/plugins/cloud/models.py:119 xpack/plugins/cloud/models.py:160 #: xpack/plugins/cloud/models.py:115 xpack/plugins/cloud/models.py:313
#: xpack/plugins/cloud/models.py:337
msgid "Strategy"
msgstr "策略"
#: xpack/plugins/cloud/models.py:120 xpack/plugins/cloud/models.py:197
msgid "Sync instance task" msgid "Sync instance task"
msgstr "同步实例任务" msgstr "同步实例任务"
#: xpack/plugins/cloud/models.py:171 xpack/plugins/cloud/models.py:219 #: xpack/plugins/cloud/models.py:208 xpack/plugins/cloud/models.py:260
msgid "Date sync" msgid "Date sync"
msgstr "同步日期" msgstr "同步日期"
#: xpack/plugins/cloud/models.py:175 #: xpack/plugins/cloud/models.py:212
msgid "Sync instance snapshot"
msgstr "同步实例快照"
#: xpack/plugins/cloud/models.py:216
msgid "Sync instance task execution" msgid "Sync instance task execution"
msgstr "同步实例任务执行" msgstr "同步实例任务执行"
#: xpack/plugins/cloud/models.py:199 #: xpack/plugins/cloud/models.py:240
msgid "Sync task" msgid "Sync task"
msgstr "同步任务" msgstr "同步任务"
#: xpack/plugins/cloud/models.py:203 #: xpack/plugins/cloud/models.py:244
msgid "Sync instance task history" msgid "Sync instance task history"
msgstr "同步实例任务历史" msgstr "同步实例任务历史"
#: xpack/plugins/cloud/models.py:206 #: xpack/plugins/cloud/models.py:247
msgid "Instance" msgid "Instance"
msgstr "实例" msgstr "实例"
#: xpack/plugins/cloud/models.py:223 #: xpack/plugins/cloud/models.py:264
msgid "Sync instance detail" msgid "Sync instance detail"
msgstr "同步实例详情" msgstr "同步实例详情"
#: xpack/plugins/cloud/models.py:281
msgid "Task strategy"
msgstr "任务策略"
#: xpack/plugins/cloud/models.py:285
msgid "Exact"
msgstr ""
#: xpack/plugins/cloud/models.py:286
msgid "Not"
msgstr "否"
#: xpack/plugins/cloud/models.py:287
msgid "In"
msgstr "在..里面"
#: xpack/plugins/cloud/models.py:288
msgid "Contains"
msgstr "包含"
#: xpack/plugins/cloud/models.py:289
msgid "Startswith"
msgstr "以..开头"
#: xpack/plugins/cloud/models.py:290
msgid "Endswith"
msgstr "以..结尾"
#: xpack/plugins/cloud/models.py:296
msgid "Instance platform"
msgstr "实例平台"
#: xpack/plugins/cloud/models.py:297
msgid "Instance address"
msgstr "实例地址"
#: xpack/plugins/cloud/models.py:304
msgid "Rule attr"
msgstr "规则属性"
#: xpack/plugins/cloud/models.py:308
msgid "Rule match"
msgstr "规则匹配"
#: xpack/plugins/cloud/models.py:310
msgid "Rule value"
msgstr "规则值"
#: xpack/plugins/cloud/models.py:317
msgid "Strategy rule"
msgstr "策略规则"
#: xpack/plugins/cloud/models.py:332
msgid "Action attr"
msgstr "动作属性"
#: xpack/plugins/cloud/models.py:334
msgid "Action value"
msgstr "动作值"
#: xpack/plugins/cloud/models.py:341
msgid "Strategy action"
msgstr "策略动作"
#: xpack/plugins/cloud/providers/aws_international.py:18 #: xpack/plugins/cloud/providers/aws_international.py:18
msgid "China (Beijing)" msgid "China (Beijing)"
msgstr "中国 (北京)" msgstr "中国 (北京)"
@ -7727,7 +7814,7 @@ msgid "CN East-Suzhou"
msgstr "华东-苏州" msgstr "华东-苏州"
#: xpack/plugins/cloud/providers/baiducloud.py:57 #: xpack/plugins/cloud/providers/baiducloud.py:57
#: xpack/plugins/cloud/providers/huaweicloud.py:50 #: xpack/plugins/cloud/providers/huaweicloud.py:49
msgid "CN-Hong Kong" msgid "CN-Hong Kong"
msgstr "中国-香港" msgstr "中国-香港"
@ -7745,66 +7832,66 @@ msgid "CN East-Shanghai"
msgstr "华东-上海" msgstr "华东-上海"
#: xpack/plugins/cloud/providers/baiducloud.py:61 #: xpack/plugins/cloud/providers/baiducloud.py:61
#: xpack/plugins/cloud/providers/huaweicloud.py:49 #: xpack/plugins/cloud/providers/huaweicloud.py:51
msgid "AP-Singapore" msgid "AP-Singapore"
msgstr "亚太-新加坡" msgstr "亚太-新加坡"
#: xpack/plugins/cloud/providers/huaweicloud.py:37
msgid "AF-Johannesburg"
msgstr "非洲-约翰内斯堡"
#: xpack/plugins/cloud/providers/huaweicloud.py:38
msgid "CN North-Beijing4"
msgstr "华北-北京4"
#: xpack/plugins/cloud/providers/huaweicloud.py:39 #: xpack/plugins/cloud/providers/huaweicloud.py:39
msgid "CN North-Beijing1" msgid "CN North-Beijing1"
msgstr "华北-北京1" msgstr "华北-北京1"
#: xpack/plugins/cloud/providers/huaweicloud.py:40 #: xpack/plugins/cloud/providers/huaweicloud.py:40
msgid "CN East-Shanghai2" msgid "CN North-Beijing4"
msgstr "华东-上海2" msgstr "华北-北京4"
#: xpack/plugins/cloud/providers/huaweicloud.py:41 #: xpack/plugins/cloud/providers/huaweicloud.py:41
msgid "CN East-Shanghai1"
msgstr "华东-上海1"
#: xpack/plugins/cloud/providers/huaweicloud.py:43
msgid "LA-Mexico City1"
msgstr "拉美-墨西哥城一"
#: xpack/plugins/cloud/providers/huaweicloud.py:44
msgid "LA-Santiago"
msgstr "拉美-圣地亚哥"
#: xpack/plugins/cloud/providers/huaweicloud.py:45
msgid "LA-Sao Paulo1"
msgstr "拉美-圣保罗一"
#: xpack/plugins/cloud/providers/huaweicloud.py:46
msgid "EU-Paris"
msgstr "欧洲-巴黎"
#: xpack/plugins/cloud/providers/huaweicloud.py:47
msgid "CN Southwest-Guiyang1"
msgstr "西南-贵阳1"
#: xpack/plugins/cloud/providers/huaweicloud.py:48
msgid "AP-Bangkok"
msgstr "亚太-曼谷"
#: xpack/plugins/cloud/providers/huaweicloud.py:52
msgid "CN Northeast-Dalian"
msgstr "华北-大连"
#: xpack/plugins/cloud/providers/huaweicloud.py:53
msgid "CN North-Ulanqab1" msgid "CN North-Ulanqab1"
msgstr "华北-乌兰察布一" msgstr "华北-乌兰察布一"
#: xpack/plugins/cloud/providers/huaweicloud.py:54 #: xpack/plugins/cloud/providers/huaweicloud.py:43
msgid "CN South-Shenzhen"
msgstr "华南-广州"
#: xpack/plugins/cloud/providers/huaweicloud.py:44
msgid "CN South-Guangzhou-InvitationOnly" msgid "CN South-Guangzhou-InvitationOnly"
msgstr "华南-广州-友好用户环境" msgstr "华南-广州-友好用户环境"
#: xpack/plugins/cloud/providers/huaweicloud.py:45
msgid "CN East-Shanghai2"
msgstr "华东-上海2"
#: xpack/plugins/cloud/providers/huaweicloud.py:46
msgid "CN East-Shanghai1"
msgstr "华东-上海1"
#: xpack/plugins/cloud/providers/huaweicloud.py:48
msgid "CN Southwest-Guiyang1"
msgstr "西南-贵阳1"
#: xpack/plugins/cloud/providers/huaweicloud.py:50
msgid "AP-Bangkok"
msgstr "亚太-曼谷"
#: xpack/plugins/cloud/providers/huaweicloud.py:53
msgid "AF-Johannesburg"
msgstr "非洲-约翰内斯堡"
#: xpack/plugins/cloud/providers/huaweicloud.py:54
msgid "LA-Mexico City1"
msgstr "拉美-墨西哥城一"
#: xpack/plugins/cloud/providers/huaweicloud.py:55
msgid "LA-Santiago"
msgstr "拉美-圣地亚哥"
#: xpack/plugins/cloud/providers/huaweicloud.py:56
msgid "LA-Sao Paulo1"
msgstr "拉美-圣保罗一"
#: xpack/plugins/cloud/providers/huaweicloud.py:58
msgid "TR-Istanbul"
msgstr ""
#: xpack/plugins/cloud/providers/jdcloud.py:126 #: xpack/plugins/cloud/providers/jdcloud.py:126
msgid "CN East-Suqian" msgid "CN East-Suqian"
msgstr "华东-宿迁" msgstr "华东-宿迁"
@ -7833,7 +7920,7 @@ msgstr "订阅 ID"
#: xpack/plugins/cloud/serializers/account_attrs.py:103 #: xpack/plugins/cloud/serializers/account_attrs.py:103
#: xpack/plugins/cloud/serializers/account_attrs.py:119 #: xpack/plugins/cloud/serializers/account_attrs.py:119
#: xpack/plugins/cloud/serializers/account_attrs.py:149 #: xpack/plugins/cloud/serializers/account_attrs.py:149
#: xpack/plugins/cloud/serializers/account_attrs.py:202 #: xpack/plugins/cloud/serializers/account_attrs.py:199
msgid "API Endpoint" msgid "API Endpoint"
msgstr "API 端点" msgstr "API 端点"
@ -7898,11 +7985,11 @@ msgstr "测试端口"
msgid "Test timeout" msgid "Test timeout"
msgstr "测试超时时间" msgstr "测试超时时间"
#: xpack/plugins/cloud/serializers/account_attrs.py:212 #: xpack/plugins/cloud/serializers/account_attrs.py:209
msgid "Project" msgid "Project"
msgstr "project" msgstr "project"
#: xpack/plugins/cloud/serializers/task.py:28 #: xpack/plugins/cloud/serializers/task.py:139
msgid "" msgid ""
"Only instances matching the IP range will be synced. <br>If the instance " "Only instances matching the IP range will be synced. <br>If the instance "
"contains multiple IP addresses, the first IP address that matches will be " "contains multiple IP addresses, the first IP address that matches will be "
@ -7914,11 +8001,11 @@ msgstr ""
"到的 IP 地址将被用作创建的资产的 IP。<br>默认值 * 表示同步所有实例和随机匹配 " "到的 IP 地址将被用作创建的资产的 IP。<br>默认值 * 表示同步所有实例和随机匹配 "
"IP 地址。<br> 例如: 192.168.1.0/24,10.1.1.1-10.1.1.20。" "IP 地址。<br> 例如: 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:145
msgid "History count" msgid "History count"
msgstr "执行次数" msgstr "执行次数"
#: xpack/plugins/cloud/serializers/task.py:35 #: xpack/plugins/cloud/serializers/task.py:146
msgid "Instance count" msgid "Instance count"
msgstr "实例个数" msgstr "实例个数"
@ -7930,10 +8017,6 @@ msgstr "执行同步实例任务"
msgid "Period clean sync instance task execution" msgid "Period clean sync instance task execution"
msgstr "定期清除同步实例任务执行记录" msgstr "定期清除同步实例任务执行记录"
#: xpack/plugins/cloud/utils.py:68
msgid "Account unavailable"
msgstr "账号无效"
#: xpack/plugins/interface/api.py:52 #: xpack/plugins/interface/api.py:52
msgid "Restore default successfully." msgid "Restore default successfully."
msgstr "恢复默认成功!" msgstr "恢复默认成功!"
@ -7998,9 +8081,6 @@ msgstr "旗舰版"
msgid "Community edition" msgid "Community edition"
msgstr "社区版" msgstr "社区版"
#~ msgid "eg: http://dev.jumpserver.org:8080"
#~ msgstr "如: http://dev.jumpserver.org:8080"
#~ msgid "Strategy" #~ msgid "Strategy"
#~ msgstr "策略" #~ msgstr "策略"
@ -8049,11 +8129,8 @@ msgstr "社区版"
#~ msgid "Action value" #~ msgid "Action value"
#~ msgstr "动作值" #~ msgstr "动作值"
#~ msgid "Strategy action" #~ msgid "CN Northeast-Dalian"
#~ msgstr "策略动作" #~ msgstr "华北-大连"
#~ msgid "CN South-Shenzhen"
#~ msgstr "华南-广州"
#~ msgid "Current only support login from AD/LDAP" #~ msgid "Current only support login from AD/LDAP"
#~ msgstr "当前仅支持 AD/LDAP 方式登录的用户" #~ msgstr "当前仅支持 AD/LDAP 方式登录的用户"

View File

@ -135,7 +135,7 @@
method: "GET", method: "GET",
flash_message: false, flash_message: false,
success(data) { success(data) {
const dateStart = new Date(data.date_start).toLocaleString(); const dateStart = data.date_start ? new Date(data.date_start).toLocaleString() : '';
$('.task-id').html(data.id); $('.task-id').html(data.id);
$('.task-type').html(data.task_name); $('.task-type').html(data.task_name);
$('.date-start').html(dateStart); $('.date-start').html(dateStart);

View File

@ -177,8 +177,10 @@ class UserPermedNodeChildrenWithAssetsAsCategoryTreeApi(
return [] return []
pid = f'ROOT_{str(assets[0].category).upper()}_{tp}' pid = f'ROOT_{str(assets[0].category).upper()}_{tp}'
return self.serialize_assets(assets, pid=pid) return self.serialize_assets(assets, pid=pid)
params = self.request.query_params
get_root = not list(filter(lambda x: params.get(x), ('type', 'n')))
resource_platforms = assets.order_by('id').values_list('platform_id', flat=True) resource_platforms = assets.order_by('id').values_list('platform_id', flat=True)
node_all = AllTypes.get_tree_nodes(resource_platforms) node_all = AllTypes.get_tree_nodes(resource_platforms, get_root=get_root)
pattern = re.compile(r'\(0\)?') pattern = re.compile(r'\(0\)?')
nodes = [] nodes = []
for node in node_all: for node in node_all:

View File

@ -144,7 +144,9 @@ only_system_permissions = (
('terminal', 'task', '*', '*'), ('terminal', 'task', '*', '*'),
('terminal', 'endpoint', '*', '*'), ('terminal', 'endpoint', '*', '*'),
('terminal', 'endpointrule', '*', '*'), ('terminal', 'endpointrule', '*', '*'),
('authentication', '*', '*', '*'), ('authentication', 'accesskey', '*', '*'),
('authentication', 'superconnectiontoken', '*', '*'),
('authentication', 'temptoken', '*', '*'),
('tickets', '*', '*', '*'), ('tickets', '*', '*', '*'),
('orgs', 'organization', 'view', 'rootorg'), ('orgs', 'organization', 'view', 'rootorg'),
('terminal', 'applet', '*', '*'), ('terminal', 'applet', '*', '*'),

View File

@ -70,6 +70,9 @@ special_pid_mapper = {
'xpack.syncinstancedetail': 'cloud_import', 'xpack.syncinstancedetail': 'cloud_import',
'xpack.syncinstancetask': 'cloud_import', 'xpack.syncinstancetask': 'cloud_import',
'xpack.syncinstancetaskexecution': 'cloud_import', 'xpack.syncinstancetaskexecution': 'cloud_import',
'xpack.strategy': 'cloud_import',
'xpack.strategyaction': 'cloud_import',
'xpack.strategyrule': 'cloud_import',
'terminal.applet': 'remote_application', 'terminal.applet': 'remote_application',
'terminal.applethost': 'remote_application', 'terminal.applethost': 'remote_application',
'accounts.accountbackupautomation': "backup_account_node", 'accounts.accountbackupautomation': "backup_account_node",

48
poetry.lock generated
View File

@ -2259,44 +2259,24 @@ url = "https://pypi.tuna.tsinghua.edu.cn/simple"
reference = "tsinghua" reference = "tsinghua"
[[package]] [[package]]
name = "elastic-transport" name = "elasticsearch"
version = "8.4.0" version = "7.8.0"
description = "Transport classes and utilities shared among Python Elastic client libraries" description = "Python client for Elasticsearch"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4"
files = [ files = [
{file = "elastic-transport-8.4.0.tar.gz", hash = "sha256:b9ad708ceb7fcdbc6b30a96f886609a109f042c0b9d9f2e44403b3133ba7ff10"}, {file = "elasticsearch-7.8.0-py2.py3-none-any.whl", hash = "sha256:6fb566dd23b91b5871ce12212888674b4cf33374e92b71b1080916c931e44dcb"},
{file = "elastic_transport-8.4.0-py3-none-any.whl", hash = "sha256:19db271ab79c9f70f8c43f8f5b5111408781a6176b54ab2e54d713b6d9ceb815"}, {file = "elasticsearch-7.8.0.tar.gz", hash = "sha256:e637d8cf4e27e279b5ff8ca8edc0c086f4b5df4bf2b48e2f950b7833aca3a792"},
] ]
[package.dependencies] [package.dependencies]
certifi = "*" certifi = "*"
urllib3 = ">=1.26.2,<2" urllib3 = ">=1.21.1"
[package.extras] [package.extras]
develop = ["aiohttp", "mock", "pytest", "pytest-asyncio", "pytest-cov", "pytest-httpserver", "pytest-mock", "requests", "trustme"] async = ["aiohttp (>=3,<4)", "yarl"]
develop = ["black", "coverage", "jinja2", "mock", "pytest", "pytest-cov", "pyyaml", "requests (>=2.0.0,<3.0.0)", "sphinx (<1.7)", "sphinx-rtd-theme"]
[package.source] docs = ["sphinx (<1.7)", "sphinx-rtd-theme"]
type = "legacy"
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
reference = "tsinghua"
[[package]]
name = "elasticsearch"
version = "8.8.2"
description = "Python client for Elasticsearch"
optional = false
python-versions = ">=3.6, <4"
files = [
{file = "elasticsearch-8.8.2-py3-none-any.whl", hash = "sha256:bffd6ce4faaacf90e6f617241773b3da8fb94e2e83554f5508e2fab92ca79643"},
{file = "elasticsearch-8.8.2.tar.gz", hash = "sha256:bed8cf8fcc6c3be7c254b579de4c29afab021f373c832246f912d37aef3c6bd5"},
]
[package.dependencies]
elastic-transport = ">=8,<9"
[package.extras]
async = ["aiohttp (>=3,<4)"]
requests = ["requests (>=2.4.0,<3.0.0)"] requests = ["requests (>=2.4.0,<3.0.0)"]
[package.source] [package.source]
@ -3378,12 +3358,12 @@ reference = "tsinghua"
[[package]] [[package]]
name = "jms-storage" name = "jms-storage"
version = "0.0.50" version = "0.0.51"
description = "Jumpserver storage python sdk tools" description = "Jumpserver storage python sdk tools"
optional = false optional = false
python-versions = "*" python-versions = "*"
files = [ files = [
{file = "jms-storage-0.0.50.tar.gz", hash = "sha256:f757180e145a9eb3390b8b32663a5feebcb1e720a6f2c36cc16f726ac047f28b"}, {file = "jms-storage-0.0.51.tar.gz", hash = "sha256:47a50ac4d952a21693b0e2f926f42fa0d02bc1fa8e507a8284059743b2b81911"},
] ]
[package.dependencies] [package.dependencies]
@ -3395,7 +3375,7 @@ certifi = "2023.7.22"
chardet = "5.1.0" chardet = "5.1.0"
crcmod = "1.7" crcmod = "1.7"
docutils = "0.20.1" docutils = "0.20.1"
elasticsearch = "8.8.2" elasticsearch = "7.8.0"
esdk-obs-python = "3.21.4" esdk-obs-python = "3.21.4"
idna = "3.4" idna = "3.4"
oss2 = "2.18.1" oss2 = "2.18.1"
@ -7244,4 +7224,4 @@ reference = "tsinghua"
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.11" python-versions = "^3.11"
content-hash = "acdb324e0081968235e843be40803734f3ab814de44c90c4367fa0ef0801759d" content-hash = "9bb582f0c306346ea364334a31c1b10b21e6beb5e3448b85cc397c744db6d2a9"

View File

@ -47,7 +47,7 @@ pynacl = "1.5.0"
python-dateutil = "2.8.2" python-dateutil = "2.8.2"
pyyaml = "6.0.1" pyyaml = "6.0.1"
requests = "2.31.0" requests = "2.31.0"
jms-storage = "0.0.50" jms-storage = "0.0.51"
simplejson = "3.19.1" simplejson = "3.19.1"
six = "1.16.0" six = "1.16.0"
sshtunnel = "0.4.0" sshtunnel = "0.4.0"