From c37212a5ce1c64ceae9b18dff4a2592aad6fd909 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Thu, 17 Aug 2023 11:42:55 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=20=E4=BC=98=E5=8C=96=20vault=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en.json | 3 ++- src/i18n/langs/ja.json | 3 ++- src/i18n/langs/zh.json | 5 +++-- src/views/settings/Feature/Vault.vue | 18 ++++++++++-------- src/views/settings/Feature/index.vue | 2 +- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 9bccddff6..a59ab0140 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -1543,7 +1543,8 @@ "ServerTime": "Server time", "Custom": "Custom", "CleanHelpText": "Regular cleanup tasks will be executed at 2 o'clock in the morning every day, and the cleaned data cannot be recovered", - "VaultHelpText": "When changing the type from database to vault, submit first ->test, and after passing, perform data synchronization (synchronization is one-way and only synchronizes from database data to vault). After modifying the vault configuration twice, the service needs to be restarted", + "EnableVaultStorage": "Opening Vault Storage", + "VaultHelpText": "1. Please go to the configuration file to open Vault storage< After opening, fill in other configurations ->click on Test< Br>3. Perform data synchronization (synchronization is one-way and only synchronizes data from the database to the vault. Please backup the data properly)< After modifying the vault configuration twice, the service needs to be restarted.", "Applets": "Applets", "EndpointListHelpMessage": "The service endpoint is the address (port) for the user to access the service. When the user connects to the asset, the service endpoint will be selected according to the endpoint rules and asset tags, and the connection will be established as the access entry to realize the distributed connection of assets.", "EndpointRuleListHelpMessage": "For the service endpoint selection strategy, two types are currently supported:
1. Specify the endpoint according to the endpoint rule (current page);
2. Select the endpoint through the asset tag. The tag name is fixed to endpoint, and the value is the name of the `endpoint`.
Two methods preferentially use label matching, because the IP segment may conflict, and the label method exists as a supplement to the rules.", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 6f69e786b..4f81a00d6 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -1538,7 +1538,8 @@ "ServerTime": "サーバータイムです", "Custom": "カスタムです", "CleanHelpText": "定期清理タスクは毎日午前2時に実行され、クリーンアップ後のデータは復元できません", - "VaultHelpText": "タイプがデータベースからVaultに変更された場合は、最初に->テストをコミットし、合格したら、データの同期を行います(同期は一方向で、データベースデータからVaultにのみ同期されます)。Vault構成を2回変更するとサービスを再起動する必要があります", + "EnableVaultStorage": "Vaultストレージを開く", + "VaultHelpText": "1.プロファイルにVaultストレージをオープンしてください。
2.オンになったら、他の構成を記入してください->テストをクリックしてください。
3.データの同期を行います(同期は単方向で、データベースデータからVaultに同期するだけです。データをバックアップしてください)。
4.Vault構成を2回変更した後、サービスを再起動する必要があります。", "OAuth2LogoTip": "ヒント: 認証サービス プロバイダー (推奨画像サイズ: 64px*64px)", "EndpointListHelpMessage": "サービスエンドポイントは、ユーザーがサービスにアクセスするためのアドレス(ポート)です。ユーザーがアセットに接続すると、エンドポイントルールとアセットタグに従ってサービスエンドポイントが選択され、接続がアクセスエントリとして確立されます。資産の分散接続を実現します。", "EndpointRuleListHelpMessage": "サービスエンドポイント選択戦略では、現在2つのタイプがサポートされています:
1. エンドポイントルールに従ってエンドポイントを指定します(現在のページ);
2. アセットタグを介してエンドポイントを選択します。タグ名はに固定されていますエンドポイントであり、値はエンドポイントの名前です。
IPセグメントが競合する可能性があるため、2つの方法が優先的にラベル照合を使用し、ラベル方法はルールの補足として存在します。", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index b6dc563af..b0d9ff0d4 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -1532,11 +1532,12 @@ "AuthSecurity": "认证安全", "MsgSubscribe": "消息订阅", "Message": "消息通知", - "Vault": "密钥匣子", + "AccountStorage": "账号存储", "ServerTime": "服务器时间", "Custom": "自定义", "CleanHelpText": "定期清理任务会在 每天凌晨 2 点执行, 清理后的数据将无法恢复", - "VaultHelpText": "类型从数据库改为 Vault 时, 先提交 -> 测试, 通过后, 进行数据同步(同步是单向的,只会从数据库数据同步到 Vault)。二次修改 Vault 配置后需重启服务", + "EnableVaultStorage": "开启 Vault 存储", + "VaultHelpText": "1. 请前往配置文件中开启 Vault 存储。
2. 开启后,填写其他配置 -> 点击测试。
3. 进行数据同步(同步是单向的,只会从数据库数据同步到 Vault,请备份好数据)。
4. 二次修改 Vault 配置后需重启服务。", "OAuth2LogoTip": "提示:认证服务提供商(建议图片大小为: 64px*64px)", "Applets": "远程应用", "EndpointListHelpMessage": "服务端点是用户访问服务的地址(端口),当用户在连接资产时,会根据端点规则和资产标签选择服务端点,作为访问入口建立连接,实现分布式连接资产", diff --git a/src/views/settings/Feature/Vault.vue b/src/views/settings/Feature/Vault.vue index 674105b83..28a1d8dc1 100644 --- a/src/views/settings/Feature/Vault.vue +++ b/src/views/settings/Feature/Vault.vue @@ -28,6 +28,7 @@ export default { { title: this.$t('common.Test'), loading: false, + disabled: !store.getters.publicSettings['VAULT_ENABLED'], callback: function(value, form, btn) { btn.loading = true vm.$axios.post( @@ -43,7 +44,7 @@ export default { { title: this.$t('setting.sync'), loading: false, - disabled: store.getters.publicSettings['VAULT_TYPE'] === 'local', + disabled: !store.getters.publicSettings['VAULT_ENABLED'], callback: function(value, form, btn) { btn.loading = true vm.$axios.post( @@ -60,9 +61,9 @@ export default { encryptedFields: ['VAULT_HCP_TOKEN'], fields: [ [ - this.$t('setting.Vault'), + this.$t('setting.AccountStorage'), [ - 'VAULT_TYPE', + 'VAULT_ENABLED', 'VAULT_HCP_HOST', 'VAULT_HCP_TOKEN', 'VAULT_HCP_MOUNT_POINT' @@ -70,22 +71,23 @@ export default { ] ], fieldsMeta: { - VAULT_TYPE: { - disabled: true + VAULT_ENABLED: { + disabled: true, + label: this.$t('setting.EnableVaultStorage') }, VAULT_HCP_HOST: { hidden: (formValue) => { - return formValue.VAULT_TYPE === 'local' + return !formValue.VAULT_ENABLED } }, VAULT_HCP_TOKEN: { hidden: (formValue) => { - return formValue.VAULT_TYPE === 'local' + return !formValue.VAULT_ENABLED } }, VAULT_HCP_MOUNT_POINT: { hidden: (formValue) => { - return formValue.VAULT_TYPE === 'local' + return !formValue.VAULT_ENABLED } } }, diff --git a/src/views/settings/Feature/index.vue b/src/views/settings/Feature/index.vue index 0a7a5ba89..b4184b718 100644 --- a/src/views/settings/Feature/index.vue +++ b/src/views/settings/Feature/index.vue @@ -29,7 +29,7 @@ export default { name: 'Announcement' }, { - title: this.$t('setting.Vault'), + title: this.$t('setting.AccountStorage'), name: 'Vault', hidden: !this.$hasPerm('settings.change_vault') },