mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 19:35:24 +00:00
fix: 修复更新平台时有多个协议只显示一个协议问题
This commit is contained in:
@@ -113,7 +113,7 @@ export default {
|
||||
},
|
||||
{
|
||||
id: 'sftp_enabled',
|
||||
label: '启用 SFTP',
|
||||
label: this.$t('common.Enable') + ' SFTP',
|
||||
type: 'switch',
|
||||
hidden: () => this.item.name !== 'ssh'
|
||||
},
|
||||
|
||||
@@ -137,13 +137,10 @@ export default {
|
||||
item.port = selected.port
|
||||
},
|
||||
setDefaultItems(choices) {
|
||||
const defaults = choices.filter(item => (item.required || item.primary || item.default))
|
||||
if (this.value.length > 0) {
|
||||
const notInDefaults = this.value.filter(item => {
|
||||
return defaults.find(d => d.name === item.name)
|
||||
})
|
||||
this.items = notInDefaults
|
||||
this.items = this.value
|
||||
} else {
|
||||
const defaults = choices.filter(item => (item.required || item.primary || item.default))
|
||||
this.items = defaults
|
||||
}
|
||||
},
|
||||
|
||||
@@ -16,13 +16,17 @@ export const platformFieldsMeta = (vm) => {
|
||||
'gather_facts_enabled', 'gather_facts_method',
|
||||
'push_account_enabled', 'push_account_method',
|
||||
'change_secret_enabled', 'change_secret_method',
|
||||
'verify_account_enabled', 'verify_account_method'
|
||||
'verify_account_enabled', 'verify_account_method',
|
||||
'gather_accounts_enabled', 'gather_accounts_method'
|
||||
],
|
||||
fieldsMeta: {
|
||||
ansible_config: {
|
||||
component: JsonEditor,
|
||||
hidden: (formValue) => !formValue['ansible_enabled']
|
||||
},
|
||||
gather_facts_enabled: {
|
||||
label: i18n.t('assets.CollectHardwareInfo')
|
||||
},
|
||||
ping_method: {},
|
||||
gather_facts_method: {},
|
||||
push_account_method: {},
|
||||
|
||||
@@ -9,13 +9,6 @@ export const assetFieldsMeta = (vm) => {
|
||||
const secretTypes = []
|
||||
return {
|
||||
address: {},
|
||||
automation: {
|
||||
fieldsMeta: {
|
||||
gather_facts_enabled: {
|
||||
label: i18n.t('assets.CollectHardwareInfo')
|
||||
}
|
||||
}
|
||||
},
|
||||
protocols: {
|
||||
component: ProtocolSelector,
|
||||
el: {
|
||||
|
||||
Reference in New Issue
Block a user