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