From 4e89c8d53f7c42a853f24cab0e23ce2d8c65a30f Mon Sep 17 00:00:00 2001 From: Bai Date: Wed, 15 Mar 2023 14:46:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E5=8F=AF=E4=BB=A5=E6=A0=B9=E6=8D=AE=20protoc?= =?UTF-8?q?ols=20=E8=BF=87=E6=BB=A4=20secret=5Ftype=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/AccountTemplateDialog.vue | 9 +++++++-- src/views/assets/Asset/AssetDetail/Account.vue | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/assets/Asset/AssetCreateUpdate/components/AccountTemplateDialog.vue b/src/views/assets/Asset/AssetCreateUpdate/components/AccountTemplateDialog.vue index baf22ed72..7e5dda258 100644 --- a/src/views/assets/Asset/AssetCreateUpdate/components/AccountTemplateDialog.vue +++ b/src/views/assets/Asset/AssetCreateUpdate/components/AccountTemplateDialog.vue @@ -66,6 +66,10 @@ export default { type: Boolean, default: false }, + asset: { + type: Object, + default: () => {} + }, accounts: { type: Array, default: () => ([]) @@ -76,12 +80,13 @@ export default { } }, data() { + const protocols = this.asset.protocols.map(i => i.name).toString() return { isShowCreate: false, accountsSelected: [], tableConfig: { - url: '/api/v1/accounts/account-templates/', - columns: ['name', 'username', 'privileged'], + url: `/api/v1/accounts/account-templates/?protocols=${protocols}`, + columns: ['name', 'username', 'secret_type', 'privileged'], columnsMeta: { name: { formatterArgs: { diff --git a/src/views/assets/Asset/AssetDetail/Account.vue b/src/views/assets/Asset/AssetDetail/Account.vue index 2c01cfce3..cd0d3606a 100644 --- a/src/views/assets/Asset/AssetDetail/Account.vue +++ b/src/views/assets/Asset/AssetDetail/Account.vue @@ -16,6 +16,7 @@