perf: Connectivity choice

This commit is contained in:
feng 2025-05-07 17:25:10 +08:00
parent 8065e04f26
commit 49f0e51769
12 changed files with 626 additions and 986 deletions

View File

@ -634,11 +634,10 @@ class Migration(migrations.Migration):
('ok', 'OK'), ('ok', 'OK'),
('err', 'Error'), ('err', 'Error'),
('auth_err', 'Authentication error'), ('auth_err', 'Authentication error'),
('sudo_err', 'Sudo permission error'),
('password_err', 'Invalid password error'), ('password_err', 'Invalid password error'),
('openssh_key_err', 'OpenSSH key error'), ('openssh_key_err', 'OpenSSH key error'),
('ntlm_err', 'NTLM credentials rejected error'), ('ntlm_err', 'NTLM credentials rejected error'),
('create_dir_err', 'Create directory error') ('create_temp_err', 'Create temporary error')
], ],
default="-", default="-",
max_length=16, max_length=16,

View File

@ -8,11 +8,10 @@ class Connectivity(TextChoices):
OK = 'ok', _('OK') OK = 'ok', _('OK')
ERR = 'err', _('Error') ERR = 'err', _('Error')
AUTH_ERR = 'auth_err', _('Authentication error') AUTH_ERR = 'auth_err', _('Authentication error')
SUDO_ERR = 'sudo_err', _('Sudo permission error')
PASSWORD_ERR = 'password_err', _('Invalid password error') PASSWORD_ERR = 'password_err', _('Invalid password error')
OPENSSH_KEY_ERR = 'openssh_key_err', _('OpenSSH key error') OPENSSH_KEY_ERR = 'openssh_key_err', _('OpenSSH key error')
NTLM_ERR = 'ntlm_err', _('NTLM credentials rejected error') NTLM_ERR = 'ntlm_err', _('NTLM credentials rejected error')
CREATE_DIR_ERR = 'create_dir_err', _('Create directory error') CREATE_TEMPORARY_ERR = 'create_temp_err', _('Create temporary error')
class AutomationTypes(TextChoices): class AutomationTypes(TextChoices):

View File

@ -36,11 +36,10 @@ class Migration(migrations.Migration):
('ok', 'OK'), ('ok', 'OK'),
('err', 'Error'), ('err', 'Error'),
('auth_err', 'Authentication error'), ('auth_err', 'Authentication error'),
('sudo_err', 'Sudo permission error'),
('password_err', 'Invalid password error'), ('password_err', 'Invalid password error'),
('openssh_key_err', 'OpenSSH key error'), ('openssh_key_err', 'OpenSSH key error'),
('ntlm_err', 'NTLM credentials rejected error'), ('ntlm_err', 'NTLM credentials rejected error'),
('create_dir_err', 'Create directory error') ('create_temp_err', 'Create temporary error')
], ],
default='-', max_length=16, verbose_name='Connectivity')), default='-', max_length=16, verbose_name='Connectivity')),
('date_verified', models.DateTimeField(null=True, verbose_name='Date verified')), ('date_verified', models.DateTimeField(null=True, verbose_name='Date verified')),

View File

@ -28,10 +28,9 @@ class AbsConnectivity(models.Model):
msg = (msg or '').strip().lower() msg = (msg or '').strip().lower()
error_map = { error_map = {
'is not in the sudoers file': Connectivity.SUDO_ERR,
'expected openssh key': Connectivity.OPENSSH_KEY_ERR, 'expected openssh key': Connectivity.OPENSSH_KEY_ERR,
'invalid/incorrect password': Connectivity.PASSWORD_ERR, 'invalid/incorrect password': Connectivity.PASSWORD_ERR,
'failed to create directory': Connectivity.CREATE_DIR_ERR, 'failed to create temporary': Connectivity.CREATE_TEMPORARY_ERR,
'ntlm: the specified credentials were rejected by the server': Connectivity.NTLM_ERR, 'ntlm: the specified credentials were rejected by the server': Connectivity.NTLM_ERR,
'permission denied': Connectivity.AUTH_ERR, 'permission denied': Connectivity.AUTH_ERR,
'authentication failed': Connectivity.AUTH_ERR, 'authentication failed': Connectivity.AUTH_ERR,

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: 2025-05-07 15:06+0800\n" "POT-Creation-Date: 2025-05-07 17:14+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"
@ -2077,34 +2077,30 @@ msgid "Authentication error"
msgstr "" msgstr ""
#: assets/const/automation.py:11 #: assets/const/automation.py:11
msgid "Sudo permission error"
msgstr ""
#: assets/const/automation.py:12
msgid "Invalid password error" msgid "Invalid password error"
msgstr "" msgstr ""
#: assets/const/automation.py:13 #: assets/const/automation.py:12
msgid "OpenSSH key error" msgid "OpenSSH key error"
msgstr "" msgstr ""
#: assets/const/automation.py:14 #: assets/const/automation.py:13
msgid "NTLM credentials rejected error" msgid "NTLM credentials rejected error"
msgstr "" msgstr ""
#: assets/const/automation.py:15 #: assets/const/automation.py:14
msgid "Create directory error" msgid "Create temporary error"
msgstr "" msgstr ""
#: assets/const/automation.py:19 #: assets/const/automation.py:18
msgid "Ping" msgid "Ping"
msgstr "" msgstr ""
#: assets/const/automation.py:20 #: assets/const/automation.py:19
msgid "Ping gateway" msgid "Ping gateway"
msgstr "" msgstr ""
#: assets/const/automation.py:21 #: assets/const/automation.py:20
msgid "Gather facts" msgid "Gather facts"
msgstr "" msgstr ""

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: 2025-05-07 15:06+0800\n" "POT-Creation-Date: 2025-05-07 17:14+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"
@ -2203,34 +2203,30 @@ msgid "Authentication error"
msgstr "Autenticación fallida" msgstr "Autenticación fallida"
#: assets/const/automation.py:11 #: assets/const/automation.py:11
msgid "Sudo permission error"
msgstr "Fallo en la elevación de privilegios"
#: assets/const/automation.py:12
msgid "Invalid password error" msgid "Invalid password error"
msgstr "Contraseña inválida" msgstr "Contraseña inválida"
#: assets/const/automation.py:13 #: assets/const/automation.py:12
msgid "OpenSSH key error" msgid "OpenSSH key error"
msgstr "Error de clave OpenSSH" msgstr "Error de clave OpenSSH"
#: assets/const/automation.py:14 #: assets/const/automation.py:13
msgid "NTLM credentials rejected error" msgid "NTLM credentials rejected error"
msgstr "NTLM Credenciales rechazadas" msgstr "NTLM Credenciales rechazadas"
#: assets/const/automation.py:15 #: assets/const/automation.py:14
msgid "Create directory error" msgid "Create temporary error"
msgstr "Error al crear el directorio" msgstr "Creación del directorio temporal fallida."
#: assets/const/automation.py:19 #: assets/const/automation.py:18
msgid "Ping" msgid "Ping"
msgstr "Prueba" msgstr "Prueba"
#: assets/const/automation.py:20 #: assets/const/automation.py:19
msgid "Ping gateway" msgid "Ping gateway"
msgstr "Puerta de enlace de prueba" msgstr "Puerta de enlace de prueba"
#: assets/const/automation.py:21 #: assets/const/automation.py:20
msgid "Gather facts" msgid "Gather facts"
msgstr "Recopilando información de activos" msgstr "Recopilando información de activos"

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: 2025-05-07 15:06+0800\n" "POT-Creation-Date: 2025-05-07 17:14+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"
@ -2106,34 +2106,30 @@ msgid "Authentication error"
msgstr "認証に失敗しました" msgstr "認証に失敗しました"
#: assets/const/automation.py:11 #: assets/const/automation.py:11
msgid "Sudo permission error"
msgstr "特権の昇格に失敗しました"
#: assets/const/automation.py:12
msgid "Invalid password error" msgid "Invalid password error"
msgstr "パスワードが無効です" msgstr "パスワードが無効です"
#: assets/const/automation.py:13 #: assets/const/automation.py:12
msgid "OpenSSH key error" msgid "OpenSSH key error"
msgstr "OpenSSHキーのエラー" msgstr "OpenSSHキーのエラー"
#: assets/const/automation.py:14 #: assets/const/automation.py:13
msgid "NTLM credentials rejected error" msgid "NTLM credentials rejected error"
msgstr "NTLM資格情報が拒否されました" msgstr "NTLM資格情報が拒否されました"
#: assets/const/automation.py:15 #: assets/const/automation.py:14
msgid "Create directory error" msgid "Create temporary error"
msgstr "ディレクトリの作成に失敗しました" msgstr "一時ディレクトリの作成に失敗しました"
#: assets/const/automation.py:19 #: assets/const/automation.py:18
msgid "Ping" msgid "Ping"
msgstr "テスト" msgstr "テスト"
#: assets/const/automation.py:20 #: assets/const/automation.py:19
msgid "Ping gateway" msgid "Ping gateway"
msgstr "テストゲートウェイ" msgstr "テストゲートウェイ"
#: assets/const/automation.py:21 #: assets/const/automation.py:20
msgid "Gather facts" msgid "Gather facts"
msgstr "資産情報の収集" msgstr "資産情報の収集"

File diff suppressed because it is too large Load Diff

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: 2025-05-07 15:06+0800\n" "POT-Creation-Date: 2025-05-07 17:14+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"
@ -2177,34 +2177,30 @@ msgid "Authentication error"
msgstr "Autenticação falhou" msgstr "Autenticação falhou"
#: assets/const/automation.py:11 #: assets/const/automation.py:11
msgid "Sudo permission error"
msgstr "Falha na elevação de privilégios"
#: assets/const/automation.py:12
msgid "Invalid password error" msgid "Invalid password error"
msgstr "Senha inválida" msgstr "Senha inválida"
#: assets/const/automation.py:13 #: assets/const/automation.py:12
msgid "OpenSSH key error" msgid "OpenSSH key error"
msgstr "Erro na chave OpenSSH" msgstr "Erro na chave OpenSSH"
#: assets/const/automation.py:14 #: assets/const/automation.py:13
msgid "NTLM credentials rejected error" msgid "NTLM credentials rejected error"
msgstr "Credenciais NTLM foram rejeitadas" msgstr "Credenciais NTLM foram rejeitadas"
#: assets/const/automation.py:15 #: assets/const/automation.py:14
msgid "Create directory error" msgid "Create temporary error"
msgstr "Falha ao criar diretório" msgstr "Falha ao criar o diretório temporário."
#: assets/const/automation.py:19 #: assets/const/automation.py:18
msgid "Ping" msgid "Ping"
msgstr "Teste" msgstr "Teste"
#: assets/const/automation.py:20 #: assets/const/automation.py:19
msgid "Ping gateway" msgid "Ping gateway"
msgstr "Gateway de teste" msgstr "Gateway de teste"
#: assets/const/automation.py:21 #: assets/const/automation.py:20
msgid "Gather facts" msgid "Gather facts"
msgstr "Coleta de informações dos ativos" msgstr "Coleta de informações dos ativos"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-07 15:06+0800\n" "POT-Creation-Date: 2025-05-07 17:14+0800\n"
"PO-Revision-Date: 2025-04-17 14:54+0300\n" "PO-Revision-Date: 2025-04-17 14:54+0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -2150,34 +2150,30 @@ msgid "Authentication error"
msgstr "Ошибка аутентификации" msgstr "Ошибка аутентификации"
#: assets/const/automation.py:11 #: assets/const/automation.py:11
msgid "Sudo permission error"
msgstr "Ошибка повышения привилегий"
#: assets/const/automation.py:12
msgid "Invalid password error" msgid "Invalid password error"
msgstr "Неверный пароль" msgstr "Неверный пароль"
#: assets/const/automation.py:13 #: assets/const/automation.py:12
msgid "OpenSSH key error" msgid "OpenSSH key error"
msgstr "Ошибка ключа OpenSSH" msgstr "Ошибка ключа OpenSSH"
#: assets/const/automation.py:14 #: assets/const/automation.py:13
msgid "NTLM credentials rejected error" msgid "NTLM credentials rejected error"
msgstr "NTLM учетные данные отклонены" msgstr "NTLM учетные данные отклонены"
#: assets/const/automation.py:15 #: assets/const/automation.py:14
msgid "Create directory error" msgid "Create temporary error"
msgstr "Не удалось создать директорию" msgstr "Создание временной директории не удалось."
#: assets/const/automation.py:19 #: assets/const/automation.py:18
msgid "Ping" msgid "Ping"
msgstr "Ping" msgstr "Ping"
#: assets/const/automation.py:20 #: assets/const/automation.py:19
msgid "Ping gateway" msgid "Ping gateway"
msgstr "Тестирование шлюза" msgstr "Тестирование шлюза"
#: assets/const/automation.py:21 #: assets/const/automation.py:20
msgid "Gather facts" msgid "Gather facts"
msgstr "Сбор информации" msgstr "Сбор информации"

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: 2025-05-07 15:06+0800\n" "POT-Creation-Date: 2025-05-07 17:14+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"
@ -2112,34 +2112,30 @@ msgid "Authentication error"
msgstr "认证失败" msgstr "认证失败"
#: assets/const/automation.py:11 #: assets/const/automation.py:11
msgid "Sudo permission error"
msgstr "提权失败"
#: assets/const/automation.py:12
msgid "Invalid password error" msgid "Invalid password error"
msgstr "密码无效" msgstr "密码无效"
#: assets/const/automation.py:13 #: assets/const/automation.py:12
msgid "OpenSSH key error" msgid "OpenSSH key error"
msgstr "OpenSSH 密钥错误" msgstr "OpenSSH 密钥错误"
#: assets/const/automation.py:14 #: assets/const/automation.py:13
msgid "NTLM credentials rejected error" msgid "NTLM credentials rejected error"
msgstr "NTLM 凭据被拒绝" msgstr "NTLM 凭据被拒绝"
#: assets/const/automation.py:15 #: assets/const/automation.py:14
msgid "Create directory error" msgid "Create temporary error"
msgstr "创建目录失败" msgstr "创建临时目录失败"
#: assets/const/automation.py:19 #: assets/const/automation.py:18
msgid "Ping" msgid "Ping"
msgstr "测试" msgstr "测试"
#: assets/const/automation.py:20 #: assets/const/automation.py:19
msgid "Ping gateway" msgid "Ping gateway"
msgstr "测试网关" msgstr "测试网关"
#: assets/const/automation.py:21 #: assets/const/automation.py:20
msgid "Gather facts" msgid "Gather facts"
msgstr "收集资产信息" msgstr "收集资产信息"

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: 2025-05-07 15:06+0800\n" "POT-Creation-Date: 2025-05-07 17:14+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"
@ -2086,34 +2086,30 @@ msgid "Authentication error"
msgstr "認證失敗" msgstr "認證失敗"
#: assets/const/automation.py:11 #: assets/const/automation.py:11
msgid "Sudo permission error"
msgstr "提權失敗"
#: assets/const/automation.py:12
msgid "Invalid password error" msgid "Invalid password error"
msgstr "密碼無效" msgstr "密碼無效"
#: assets/const/automation.py:13 #: assets/const/automation.py:12
msgid "OpenSSH key error" msgid "OpenSSH key error"
msgstr "OpenSSH 金鑰錯誤" msgstr "OpenSSH 金鑰錯誤"
#: assets/const/automation.py:14 #: assets/const/automation.py:13
msgid "NTLM credentials rejected error" msgid "NTLM credentials rejected error"
msgstr "NTLM 憑據被拒絕" msgstr "NTLM 憑據被拒絕"
#: assets/const/automation.py:15 #: assets/const/automation.py:14
msgid "Create directory error" msgid "Create temporary error"
msgstr "創建目錄失敗" msgstr "創建臨時目錄失敗"
#: assets/const/automation.py:19 #: assets/const/automation.py:18
msgid "Ping" msgid "Ping"
msgstr "測試" msgstr "測試"
#: assets/const/automation.py:20 #: assets/const/automation.py:19
msgid "Ping gateway" msgid "Ping gateway"
msgstr "測試網關" msgstr "測試網關"
#: assets/const/automation.py:21 #: assets/const/automation.py:20
msgid "Gather facts" msgid "Gather facts"
msgstr "收集資產資訊" msgstr "收集資產資訊"
@ -10971,6 +10967,9 @@ msgstr "許可證匯入成功"
msgid "Invalid license" msgid "Invalid license"
msgstr "許可證無效" msgstr "許可證無效"
#~ msgid "Sudo permission error"
#~ msgstr "提權失敗"
#, fuzzy #, fuzzy
#~ msgid "Directory services" #~ msgid "Directory services"
#~ msgstr "目錄服務" #~ msgstr "目錄服務"