diff --git a/src/dashboard/src/pages/Operator/Node/index.js b/src/dashboard/src/pages/Operator/Node/index.js index 1d20d1f94..66d0e4ff5 100644 --- a/src/dashboard/src/pages/Operator/Node/index.js +++ b/src/dashboard/src/pages/Operator/Node/index.js @@ -207,7 +207,8 @@ const CreateNode = props => { }; const onFinish = values => { - handleCreate(values, createCallback); + const msg = { ...values, num: parseInt(values.num, 10) }; + handleCreate(msg, createCallback); }; const formItemLayout = { diff --git a/src/dashboard/src/services/node.js b/src/dashboard/src/services/node.js index 0e435de46..258a7f498 100644 --- a/src/dashboard/src/services/node.js +++ b/src/dashboard/src/services/node.js @@ -34,7 +34,8 @@ export async function deleteNode(params) { } export async function operateNode(params) { - return request(`/api/v1/nodes/${params.id}/operations?action=${params.message}`, { + return request(`/api/v1/nodes/${params.id}/operations`, { method: 'POST', + data: { action: params.message }, }); }