mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
fix: Edit advanced orchestration applications, add application nodes, and display that some applications are unavailable after being added (#2945)
This commit is contained in:
parent
8a194481ac
commit
6484fef8ea
|
|
@ -238,41 +238,49 @@ const update_field = () => {
|
|||
const new_user_input_field_list = cloneDeep(
|
||||
ok.data.work_flow.nodes[0].properties.user_input_field_list
|
||||
)
|
||||
const merge_api_input_field_list = new_api_input_field_list.map((item: any) => {
|
||||
const find_field = old_api_input_field_list.find(
|
||||
(old_item: any) => old_item.variable == item.variable
|
||||
)
|
||||
if (find_field) {
|
||||
return {
|
||||
...item,
|
||||
value: find_field.value,
|
||||
label:
|
||||
typeof item.label === 'object' && item.label != null ? item.label.label : item.label
|
||||
const merge_api_input_field_list =
|
||||
new_api_input_field_list ||
|
||||
[].map((item: any) => {
|
||||
const find_field = old_api_input_field_list.find(
|
||||
(old_item: any) => old_item.variable == item.variable
|
||||
)
|
||||
if (find_field) {
|
||||
return {
|
||||
...item,
|
||||
value: find_field.value,
|
||||
label:
|
||||
typeof item.label === 'object' && item.label != null
|
||||
? item.label.label
|
||||
: item.label
|
||||
}
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
})
|
||||
set(
|
||||
props.nodeModel.properties.node_data,
|
||||
'api_input_field_list',
|
||||
merge_api_input_field_list
|
||||
)
|
||||
const merge_user_input_field_list = new_user_input_field_list.map((item: any) => {
|
||||
const find_field = old_user_input_field_list.find(
|
||||
(old_item: any) => old_item.field == item.field
|
||||
)
|
||||
if (find_field) {
|
||||
return {
|
||||
...item,
|
||||
value: find_field.value,
|
||||
label:
|
||||
typeof item.label === 'object' && item.label != null ? item.label.label : item.label
|
||||
const merge_user_input_field_list =
|
||||
new_user_input_field_list ||
|
||||
[].map((item: any) => {
|
||||
const find_field = old_user_input_field_list.find(
|
||||
(old_item: any) => old_item.field == item.field
|
||||
)
|
||||
if (find_field) {
|
||||
return {
|
||||
...item,
|
||||
value: find_field.value,
|
||||
label:
|
||||
typeof item.label === 'object' && item.label != null
|
||||
? item.label.label
|
||||
: item.label
|
||||
}
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
})
|
||||
set(
|
||||
props.nodeModel.properties.node_data,
|
||||
'user_input_field_list',
|
||||
|
|
@ -294,6 +302,7 @@ const update_field = () => {
|
|||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
set(props.nodeModel.properties, 'status', 500)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue