fix(web): workflow save function
This commit is contained in:
@@ -113,11 +113,9 @@ const McpServiceModal = forwardRef<McpServiceModalRef, McpServiceModalProps>(({
|
|||||||
request.then((res: any) => {
|
request.then((res: any) => {
|
||||||
message.success(t('common.saveSuccess'));
|
message.success(t('common.saveSuccess'));
|
||||||
testConnection(res.tool_id || editVo?.id)
|
testConnection(res.tool_id || editVo?.id)
|
||||||
.then(() => {
|
|
||||||
handleClose();
|
|
||||||
})
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
handleClose();
|
||||||
refresh()
|
refresh()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -783,20 +783,21 @@ export const useWorkflowGraph = ({
|
|||||||
}),
|
}),
|
||||||
edges: edges.map((edge: Edge) => {
|
edges: edges.map((edge: Edge) => {
|
||||||
const sourceCell = graphRef.current?.getCellById(edge.getSourceCellId());
|
const sourceCell = graphRef.current?.getCellById(edge.getSourceCellId());
|
||||||
|
const targetCell = graphRef.current?.getCellById(edge.getTargetCellId());
|
||||||
const sourcePortId = edge.getSourcePortId();
|
const sourcePortId = edge.getSourcePortId();
|
||||||
|
|
||||||
// 如果是if-else节点的右侧端口连线,添加label
|
// 如果是if-else节点的右侧端口连线,添加label
|
||||||
if (sourceCell?.getData()?.type === 'if-else' && sourcePortId?.startsWith('CASE')) {
|
if (sourceCell?.getData()?.type === 'if-else' && sourcePortId?.startsWith('CASE')) {
|
||||||
return {
|
return {
|
||||||
source: edge.getSourceCellId(),
|
source: sourceCell.getData().id,
|
||||||
target: edge.getTargetCellId(),
|
target: targetCell?.getData().id,
|
||||||
label: sourcePortId,
|
label: sourcePortId,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
source: edge.getSourceCellId(),
|
source: sourceCell?.getData().id,
|
||||||
target: edge.getTargetCellId(),
|
target: targetCell?.getData().id,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user