admin(ui): use new node port columns
This commit is contained in:
parent
5f56ff0fed
commit
3c2094890a
7 changed files with 160 additions and 28 deletions
|
@ -1,10 +1,10 @@
|
|||
import http from '@/api/http';
|
||||
import { Node, rawDataToNode } from '@/api/admin/nodes/getNodes';
|
||||
|
||||
export default (id: number, name: string, description: string | null, include: string[] = []): Promise<Node> => {
|
||||
export default (id: number, node: Partial<Node>, include: string[] = []): Promise<Node> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.patch(`/api/application/nodes/${id}`, {
|
||||
name, description,
|
||||
...node,
|
||||
}, { params: { include: include.join(',') } })
|
||||
.then(({ data }) => resolve(rawDataToNode(data)))
|
||||
.catch(reject);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue