mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-20 10:09:04 +00:00
fix: 优化账号模版可以根据 protocols 过滤 secret_type 字段
This commit is contained in:
parent
5902475778
commit
4e89c8d53f
@ -66,6 +66,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
asset: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
},
|
||||||
accounts: {
|
accounts: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => ([])
|
default: () => ([])
|
||||||
@ -76,12 +80,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const protocols = this.asset.protocols.map(i => i.name).toString()
|
||||||
return {
|
return {
|
||||||
isShowCreate: false,
|
isShowCreate: false,
|
||||||
accountsSelected: [],
|
accountsSelected: [],
|
||||||
tableConfig: {
|
tableConfig: {
|
||||||
url: '/api/v1/accounts/account-templates/',
|
url: `/api/v1/accounts/account-templates/?protocols=${protocols}`,
|
||||||
columns: ['name', 'username', 'privileged'],
|
columns: ['name', 'username', 'secret_type', 'privileged'],
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
name: {
|
name: {
|
||||||
formatterArgs: {
|
formatterArgs: {
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<AccountTemplateDialog
|
<AccountTemplateDialog
|
||||||
v-if="templateDialogVisible"
|
v-if="templateDialogVisible"
|
||||||
:show-create="false"
|
:show-create="false"
|
||||||
|
:asset="object"
|
||||||
:visible.sync="templateDialogVisible"
|
:visible.sync="templateDialogVisible"
|
||||||
@onConfirm="onConfirm"
|
@onConfirm="onConfirm"
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user