mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-16 07:09:14 +00:00
perf: 创建资产类型为web时,资产详情添加账号过滤掉切换字、特权账号等字段
This commit is contained in:
@@ -32,6 +32,10 @@ export default {
|
||||
}
|
||||
},
|
||||
data() {
|
||||
let privileged = ['privileged', 'su_from']
|
||||
if (this.asset?.type?.value === 'website') {
|
||||
privileged = []
|
||||
}
|
||||
return {
|
||||
loading: true,
|
||||
usernameChanged: false,
|
||||
@@ -49,7 +53,7 @@ export default {
|
||||
form: this.account || {},
|
||||
fields: [
|
||||
[this.$t('assets.Asset'), ['assets']],
|
||||
[this.$t('common.Basic'), ['name', 'username', 'privileged', 'su_from']],
|
||||
[this.$t('common.Basic'), ['name', 'username', ...privileged]],
|
||||
[this.$t('assets.Secret'), [
|
||||
'secret_type', 'secret', 'ssh_key', 'token',
|
||||
'api_key', 'passphrase'
|
||||
|
@@ -56,7 +56,7 @@ export default {
|
||||
const query = this.$route.query || {}
|
||||
const automation = values['automation'] || {}
|
||||
const category_type = values['category_type']
|
||||
const ansibleConfig = automation?.['ansible_config']
|
||||
const ansibleConfig = automation?.['ansible_config'] || {}
|
||||
automation.ansible_config = ansibleConfig instanceof Object ? ansibleConfig : JSON.parse(ansibleConfig)
|
||||
|
||||
if (query.hasOwnProperty('clone_from')) {
|
||||
|
Reference in New Issue
Block a user