mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 23:18:17 +00:00
Fixed: Fix the issue of losing the automation status when cloning the platform list. (#4951)
* Fixed: Fix the issue of losing the automation status when cloning the platform list. * Fixed: Remove console --------- Co-authored-by: zhaojisen <1301338853@qq.com>
This commit is contained in:
parent
6fa4efaa5f
commit
03d1e9a881
@ -60,13 +60,11 @@ export default {
|
|||||||
url: `/api/v1/assets/platforms/`,
|
url: `/api/v1/assets/platforms/`,
|
||||||
cleanFormValue: (values) => {
|
cleanFormValue: (values) => {
|
||||||
const protocols = values['protocols'] || []
|
const protocols = values['protocols'] || []
|
||||||
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 (automation.hasOwnProperty('id')) {
|
if (automation.hasOwnProperty('id')) {
|
||||||
delete automation['id']
|
delete automation['id']
|
||||||
}
|
}
|
||||||
@ -76,7 +74,6 @@ export default {
|
|||||||
}
|
}
|
||||||
return i
|
return i
|
||||||
})
|
})
|
||||||
}
|
|
||||||
values['category'] = category_type[0]
|
values['category'] = category_type[0]
|
||||||
values['type'] = category_type[1]
|
values['type'] = category_type[1]
|
||||||
return values
|
return values
|
||||||
|
Loading…
Reference in New Issue
Block a user