perf: load custom protocols

pull/15416/head
ibuler 2025-05-15 11:29:32 +08:00 committed by 老广
parent 986bc926fc
commit 4f009504ad
8 changed files with 28 additions and 14 deletions

View File

@ -344,6 +344,20 @@ class Protocol(ChoicesMixin, models.TextChoices):
if not xpack_enabled and config.get('xpack', False):
continue
protocols.append(protocol)
from assets.models.platform import PlatformProtocol
custom_protocols = (
PlatformProtocol.objects
.filter(platform__category='custom')
.values_list('name', flat=True)
.distinct()
)
for protocol in custom_protocols:
if protocol not in protocols:
if not protocol:
continue
label = protocol[0].upper() + protocol[1:]
protocols.append({'label': label, 'value': protocol})
return protocols
@classmethod

View File

@ -788,7 +788,7 @@
"MFAAllUsers": "Globally: All users",
"MFAErrorMsg": "MFA errors, please check",
"MFAOfUserFirstLoginPersonalInformationImprovementPage": "Enable multi-factor authentication to make your account more secure. <br/>after enabling, you will enter the multi-factor authentication binding process the next time you login; you can also directly bind in (personal information->quick modification->change multi-factor settings)!",
"MFAOfUserFirstLoginUserGuidePage": "In order to protect your and the company's security, please carefully safeguard important sensitive information such as your account, password, and key (for example, set a complex password, and enable multi-factor authentication) <br/> personal information such as email, mobile number, and wechat are only used for user authentication and platform internal message notifications.",
"MFAOfUserFirstLoginUserGuidePage": "In order to protect your and the company's security, please carefully safeguard important sensitive information such as your account, password, and key (for example, set a complex password, and enable multi-factor authentication) <br/> personal information such as email, and mobile number only used for user authentication and platform internal message notifications.",
"MFAOnlyAdminUsers": "Globally: Only admin",
"MIN_LENGTH_ERROR": "Passwords must be at least {0} characters.",
"MailRecipient": "Email recipients",
@ -1549,4 +1549,4 @@
"setVariable": "Set variable",
"userId": "User ID",
"userName": "User name"
}
}

View File

@ -788,7 +788,7 @@
"MFAAllUsers": "Activar globalmente: Todos los usuarios",
"MFAErrorMsg": "Error MFA, por favor verifica",
"MFAOfUserFirstLoginPersonalInformationImprovementPage": "Habilitar la autenticación multifactor para hacer tu cuenta más segura.<br/> Una vez habilitada, pasarás por el proceso de vinculación de autenticación multifactor la próxima vez que inicies sesión; también puedes vincularlo directamente en (Información personal -> Modificación rápida -> Cambiar configuración multifactor).",
"MFAOfUserFirstLoginUserGuidePage": "Para proteger su seguridad y la de la empresa, por favor guarde adecuadamente su cuenta, contraseña y claves u otra información sensible importante; (por ejemplo: establecer una contraseña compleja y habilitar la autenticación multifactor)<br/> La información personal como correo electrónico, número de teléfono, WeChat, etc., se utilizará únicamente para la autenticación del usuario y la notificación de mensajes dentro de la plataforma.",
"MFAOfUserFirstLoginUserGuidePage": "Para proteger su seguridad y la de la empresa, por favor guarde adecuadamente su cuenta, contraseña y claves u otra información sensible importante; (por ejemplo: establecer una contraseña compleja y habilitar la autenticación multifactor)<br/> La información personal como correo electrónico, número de teléfono, etc., se utilizará únicamente para la autenticación del usuario y la notificación de mensajes dentro de la plataforma.",
"MFAOnlyAdminUsers": "Habilitación global: solo administrador",
"MIN_LENGTH_ERROR": "La longitud de la contraseña debe ser al menos {0} caracteres",
"MailRecipient": "Destinatario del correo electrónico",
@ -1554,4 +1554,4 @@
"setVariable": "configurar parámetros",
"userId": "ID de usuario",
"userName": "Nombre de usuario"
}
}

View File

@ -793,7 +793,7 @@
"MFAAllUsers": "グローバル有効化:全ユーザー",
"MFAErrorMsg": "MFAエラー、確認してください",
"MFAOfUserFirstLoginPersonalInformationImprovementPage": "多要素認証を有効にしてアカウントをより安全にします。<br/>有効化後、次回のログイン時に多要素認証のバインディングプロセスに入るでしょう。また、(個人情報->速やかに変更->多要素設定を変更)で直接バインディングすることもできます!",
"MFAOfUserFirstLoginUserGuidePage": "あなたと会社の安全を保つために、アカウント、パスワード、鍵などの重要な機密情報を適切に管理してください。(例:複雑なパスワードの設定、そして多要素認証の有効化)<br/> メール、携帯電話番号、WeChat等の個人情報は、ユーザー認証とプラットフォーム内部でのメッセージ通知にのみ使用されます。",
"MFAOfUserFirstLoginUserGuidePage": "あなたと会社の安全を保つために、アカウント、パスワード、鍵などの重要な機密情報を適切に管理してください。(例:複雑なパスワードの設定、そして多要素認証の有効化)<br/> メール、携帯電話番号 等の個人情報は、ユーザー認証とプラットフォーム内部でのメッセージ通知にのみ使用されます。",
"MFAOnlyAdminUsers": "グローバル有効化:管理者のみ",
"MIN_LENGTH_ERROR": "パスワードの長さは少なくとも {0} 文字でなければなりません",
"MailRecipient": "メール受信者",
@ -1559,4 +1559,4 @@
"setVariable": "パラメータ設定",
"userId": "ユーザーID",
"userName": "ユーザー名"
}
}

View File

@ -789,7 +789,7 @@
"MFAAllUsers": "Ativação global: Todos os usuários",
"MFAErrorMsg": "Erro de MFA, por favor verifique",
"MFAOfUserFirstLoginPersonalInformationImprovementPage": " Ative a autenticação de dois fatores para tornar sua conta mais segura. <br/> Após a ativação, você entrará no processo de vinculação de autenticação de dois fatores na próxima vez que fizer login; Você também pode vincular diretamente em (Informações pessoais -> Modificação rápida -> Alterar configurações de dois fatores)! ",
"MFAOfUserFirstLoginUserGuidePage": "Para proteger a sua segurança e a da empresa, cuide bem de suas contas, senhas e chaves importantes e outras informações sensíveis; (por exemplo, estabelecer uma senha complexa e habilitar autenticação de dois fatores)<br/> Informações pessoais como email, número de celular, WeChat, etc, são usadas apenas para autenticação de usuário e notificações internas da plataforma.",
"MFAOfUserFirstLoginUserGuidePage": "Para proteger a sua segurança e a da empresa, cuide bem de suas contas, senhas e chaves importantes e outras informações sensíveis; (por exemplo, estabelecer uma senha complexa e habilitar autenticação de dois fatores)<br/> Informações pessoais como email, número de celular, etc, são usadas apenas para autenticação de usuário e notificações internas da plataforma.",
"MFAOnlyAdminUsers": "Habilitado globalmente: Apenas administradores",
"MIN_LENGTH_ERROR": "O comprimento da senha deve ser no mínimo {0} caracteres",
"MailRecipient": "Destinatários de Email",
@ -1555,4 +1555,4 @@
"setVariable": "Parâmetros de configuração",
"userId": "ID do usuário",
"userName": "Usuário"
}
}

View File

@ -790,7 +790,7 @@
"MFAAllUsers": "Глобально: Все пользователи",
"MFAErrorMsg": "Ошибка МФА, пожалуйста, проверьте",
"MFAOfUserFirstLoginPersonalInformationImprovementPage": "Включите многофакторную аутентификацию для повышения безопасности учетной записи. <br/> После включения при следующем входе в систему вы пройдете процесс привязки многофакторной аутентификации; вы также можете привязать её напрямую в (Личная информация->Быстрое изменение->Изменить настройки многофакторной аутентификации)!",
"MFAOfUserFirstLoginUserGuidePage": "Чтобы защитить свою безопасность и безопасность компании, пожалуйста, тщательно защищайте важную конфиденциальную информацию, такую ​​как ваша учетная запись, пароль и ключ (например, установите сложный пароль и включите многофакторную аутентификацию). <br/> Персональные данные, такие как адрес электронной почты, номер мобильного телефона и WeChat, используются только для аутентификации пользователей и внутренних уведомлений платформы.",
"MFAOfUserFirstLoginUserGuidePage": "Чтобы защитить свою безопасность и безопасность компании, пожалуйста, тщательно защищайте важную конфиденциальную информацию, такую ​​как ваша учетная запись, пароль и ключ (например, установите сложный пароль и включите многофакторную аутентификацию). <br/> Персональные данные, такие как адрес электронной почты, номер мобильного телефона и, используются только для аутентификации пользователей и внутренних уведомлений платформы.",
"MFAOnlyAdminUsers": "Глобально: Только администратор",
"MIN_LENGTH_ERROR": "Длина пароля должна быть не менее {0} символов",
"MailRecipient": "Получатели письма",
@ -1556,4 +1556,4 @@
"setVariable": "Задать переменную",
"userId": "Идентификатор пользователя",
"userName": "Имя пользователя"
}
}

View File

@ -788,7 +788,7 @@
"MFAAllUsers": "全局启用: 所有用户",
"MFAErrorMsg": "MFA错误请检查",
"MFAOfUserFirstLoginPersonalInformationImprovementPage": "启用多因子认证,使账号更加安全。<br/> 启用之后您将会在下次登录时进入多因子认证绑定流程;您也可以在(个人信息->快速修改->更改多因子设置)中直接绑定!",
"MFAOfUserFirstLoginUserGuidePage": "为了保护您和公司的安全,请妥善保管您的账号、密码和密钥等重要敏感信息;(如:设置复杂密码,并启用多因子认证)<br/> 邮箱、手机号、微信等个人信息,仅作为用户认证和平台内部消息通知使用。",
"MFAOfUserFirstLoginUserGuidePage": "为了保护您和公司的安全,请妥善保管您的账号、密码和密钥等重要敏感信息;(如:设置复杂密码,并启用多因子认证)<br/> 邮箱、手机号等个人信息,仅作为用户认证和平台内部消息通知使用。",
"MFAOnlyAdminUsers": "全局启用: 仅管理员",
"MIN_LENGTH_ERROR": "密码长度至少为 {0} 位",
"MailRecipient": "邮件收件人",
@ -1554,4 +1554,4 @@
"setVariable": "设置参数",
"userId": "用户ID",
"userName": "用户名"
}
}

View File

@ -793,7 +793,7 @@
"MFAAllUsers": "全球啟用:所有用戶",
"MFAErrorMsg": "MFA錯誤請檢查",
"MFAOfUserFirstLoginPersonalInformationImprovementPage": "啟用多因子認證,使帳號更加安全。<br/> 啟用之後您將會在下次登入時進入多因子認證綁定流程;您也可以在(個人資訊->快速修改->更改多因子設置)中直接綁定!",
"MFAOfUserFirstLoginUserGuidePage": "為了保護您和公司的安全,請妥善保管您的帳戶、密碼和金鑰等重要敏感資訊;(如:設置複雜密碼,並啟用多因子認證)<br/> 信箱、手機號碼、微信等個人資訊,僅作為用戶認證和平台內部消息通知使用。",
"MFAOfUserFirstLoginUserGuidePage": "為了保護您和公司的安全,請妥善保管您的帳戶、密碼和金鑰等重要敏感資訊;(如:設置複雜密碼,並啟用多因子認證)<br/> 信箱、手機號碼 等個人資訊,僅作為用戶認證和平台內部消息通知使用。",
"MFAOnlyAdminUsers": "全球啟用:僅管理員",
"MIN_LENGTH_ERROR": "密碼最小長度 {0} 位",
"MailRecipient": "郵件收件人",
@ -1559,4 +1559,4 @@
"setVariable": "設置參數",
"userId": "用戶ID",
"userName": "用戶名"
}
}