fix(web): change http body key name
This commit is contained in:
@@ -85,9 +85,9 @@ const EditableTable: FC<EditableTableProps> = ({
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
title: t('workflow.config.name'),
|
title: t('workflow.config.name'),
|
||||||
dataIndex: 'name',
|
dataIndex: 'key',
|
||||||
render: (_: any, __: TableRow, index: number) => (
|
render: (_: any, __: TableRow, index: number) => (
|
||||||
<Form.Item name={[index, 'name']} className={formClassName}>
|
<Form.Item name={[index, 'key']} className={formClassName}>
|
||||||
<Editor
|
<Editor
|
||||||
options={namefilterOptions}
|
options={namefilterOptions}
|
||||||
type="input"
|
type="input"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 15:17:48
|
* @Date: 2026-02-03 15:17:48
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-04-13 15:33:58
|
* @Last Modified time: 2026-04-14 15:05:33
|
||||||
*/
|
*/
|
||||||
import { Clipboard, Graph, Keyboard, MiniMap, Node, Snapline, type Edge } from '@antv/x6';
|
import { Clipboard, Graph, Keyboard, MiniMap, Node, Snapline, type Edge } from '@antv/x6';
|
||||||
import { register } from '@antv/x6-react-shape';
|
import { register } from '@antv/x6-react-shape';
|
||||||
@@ -204,7 +204,7 @@ export const useWorkflowGraph = ({
|
|||||||
? Object.entries(group_variables as Record<string, any>).map(([key, value]) => ({ key, value }))
|
? Object.entries(group_variables as Record<string, any>).map(([key, value]) => ({ key, value }))
|
||||||
: group_variables
|
: group_variables
|
||||||
} else if (type === 'http-request' && (key === 'headers' || key === 'params') && config[key] && typeof config[key] === 'object' && !Array.isArray(config[key]) && nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
|
} else if (type === 'http-request' && (key === 'headers' || key === 'params') && config[key] && typeof config[key] === 'object' && !Array.isArray(config[key]) && nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
|
||||||
nodeLibraryConfig.config[key].defaultValue = Object.entries(config[key]).map(([name, value]) => ({ name, value }))
|
nodeLibraryConfig.config[key].defaultValue = Object.entries(config[key]).map(([key, value]) => ({ key, value }))
|
||||||
} else if (type === 'code' && key === 'code' && config[key] && nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
|
} else if (type === 'code' && key === 'code' && config[key] && nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
|
||||||
try {
|
try {
|
||||||
nodeLibraryConfig.config[key].defaultValue = decodeURIComponent(atob(config[key] as string))
|
nodeLibraryConfig.config[key].defaultValue = decodeURIComponent(atob(config[key] as string))
|
||||||
@@ -1259,7 +1259,7 @@ export const useWorkflowGraph = ({
|
|||||||
itemConfig[key] = {}
|
itemConfig[key] = {}
|
||||||
if (value.length > 0) {
|
if (value.length > 0) {
|
||||||
value.forEach((vo: any) => {
|
value.forEach((vo: any) => {
|
||||||
itemConfig[key][vo.name] = vo.value
|
itemConfig[key][vo.key] = vo.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (data.config[key] && 'defaultValue' in data.config[key] && key !== 'knowledge_retrieval') {
|
} else if (data.config[key] && 'defaultValue' in data.config[key] && key !== 'knowledge_retrieval') {
|
||||||
|
|||||||
Reference in New Issue
Block a user