From fb757686e397f9ae1ef335ef71bc376e07c1dc2f Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Thu, 12 Oct 2023 16:56:43 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=B5=84=E4=BA=A7=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B9=B3=E5=8F=B0=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=B9=B3=E5=8F=B0=E7=BA=A6=E6=9D=9F=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E8=87=AA=E5=8A=A8=E7=94=9F=E6=95=88?= 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 | 1 + .../assets/Platform/PlatformDetail/Detail.vue | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 86735aaca..775892d94 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -230,6 +230,7 @@ "NoSQLProtocol": "NoSQL Protocol" }, "assets": { + "SyncProtocolToAsset": "Sync protocol to asset", "CommentHelpText": "Note: Note information will be hovered and displayed in the user authorization asset tree of Luna page, which can be viewed by ordinary users. Please do not fill in sensitive information.", "BulkUpdatePlatformHelpText": "Only when the original platform type of the asset is the same as the selected platform type will it be updated, if the platform type before and after the update is different, it will not be updated.", "ImportMessage": "Please go to the page of mapping type to import data", @@ -2319,4 +2320,4 @@ "ApiKeyWarning": "To reduce the risk of AccessKey exposure, Secret is provided only during creation and cannot be queried again later. Please keep it safe.", "PasskeyAddDisableInfo": "Your authentication source is {source}, and Passkey addition is not supported." } -} \ No newline at end of file +} diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index e261aaa40..31af15cd9 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -230,6 +230,7 @@ "NoSQLProtocol": "非リレーショナルデータベース" }, "assets": { + "SyncProtocolToAsset": "プロトコルをアセットに同期", "CommentHelpText": "注意:コメント情報はLunaページのユーザー認可資産ツリーに表示されます。一般ユーザーは表示できますので、機密情報を記入しないでください。", "BulkUpdatePlatformHelpText": "アセットの元のプラットフォーム タイプが選択したプラットフォーム タイプと同じ場合にのみ更新され、更新の前後のプラットフォーム タイプが異なる場合は更新されません。", "ImportMessage": "ミラータイプのページにデータをインポートしてください", @@ -2310,4 +2311,4 @@ "ApiKeyWarning": "AccessKeyの漏洩リスクを低減するため、Secretは作成時にのみ提供され、後で再度クエリできません。安全に保管してください。", "PasskeyAddDisableInfo": "あなたの認証元は {source} であり、Passkeyの追加はサポートされていません。" } -} \ No newline at end of file +} diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 4e8370a69..889e0da11 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -230,6 +230,7 @@ }, "assets": { "CustomType": "自定义类型", + "SyncProtocolToAsset": "同步协议到资产", "CustomHelpMessage": "自定义类型资产,依赖于远程应用,请前往系统设置在远程应用中配置", "CustomFields": "自定义属性", "CommentHelpText": "注意:备注信息会在 Luna 页面的用户授权资产树中进行悬停显示,普通用户可以查看,请不要填写敏感信息。", diff --git a/src/views/assets/Platform/PlatformDetail/Detail.vue b/src/views/assets/Platform/PlatformDetail/Detail.vue index 9deab0fe1..f0874cf61 100644 --- a/src/views/assets/Platform/PlatformDetail/Detail.vue +++ b/src/views/assets/Platform/PlatformDetail/Detail.vue @@ -131,6 +131,22 @@ export default { }) } }) + }, + { + title: this.$t(`assets.SyncProtocolToAsset`), + attrs: { + type: 'primary', + label: this.$t('accounts.Sync') + }, + callbacks: Object.freeze({ + click: () => { + const data = { platform_id: this.object.id } + this.$axios.post( + '/api/v1/assets/assets/sync-platform-protocols/', data).then(res => { + this.$message.success(this.$tc('common.updateSuccessMsg')) + }) + } + }) } ] this.quickActions = quickActions