From 0d3db253cad1fb49c4fae9b9a537c8c318c7172f Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期三, 29 十一月 2023 10:23:59 +0800 Subject: [PATCH] 优化应用中心卸载 --- src/api/clusterManage.ts | 74 +++++++++++++++++++++++++++---------- 1 files changed, 54 insertions(+), 20 deletions(-) diff --git a/src/api/clusterManage.ts b/src/api/clusterManage.ts index bbeb747..755301c 100644 --- a/src/api/clusterManage.ts +++ b/src/api/clusterManage.ts @@ -1,5 +1,5 @@ -import request from "@/scripts/httpRequest"; -import qs from "qs"; +import request from "@/scripts/httpRequest" +import qs from "qs" // 鑾峰彇闅忔満瀵嗙爜 export const randomPwd = (query: any) => { @@ -7,17 +7,17 @@ url: "/data/api-v/cluster/randomPwd", method: "get", params: query - }); -}; + }) +} // 鍒涘缓闆嗙兢 -export const createColony = (query: any) => { +export const createSerfCluster = (query: any) => { return request({ url: "/data/api-v/cluster/create", method: "post", data: query }) -}; +} // 鎼滅储闆嗙兢 export const search = (query: any) => { @@ -26,7 +26,7 @@ method: "post", data: query }) -}; +} // 璋僺earch鍚庯紝閫氳繃姝ゆ帴鍙h幏鍙栨煡鍒扮殑闆嗙兢鑺傜偣淇℃伅 export const getSearchNodes = (query: any) => { @@ -34,8 +34,8 @@ url: "/data/api-v/cluster/getSearchNodes", method: "get", params: query - }); -}; + }) +} // 鍋滄鎼滅储 export const stopSearching = (query: any) => { @@ -44,7 +44,7 @@ method: "post", data: query }) -}; +} // 鏌ヨ鏈湴闆嗙兢 export const findCluster = (query: any) => { @@ -52,17 +52,17 @@ url: "/data/api-v/cluster/findCluster", method: "get", params: query - }); -}; + }) +} // 淇濆瓨闆嗙兢鍚嶇О export const updateClusterName = (query: any) => { return request({ - url: '/data/api-v/cluster/updateClusterName', - method: 'post', + url: "/data/api-v/cluster/updateClusterName", + method: "post", data: qs.stringify(query) }) -}; +} // 鍔犲叆闆嗙兢 export const joinCluster = (query: any) => { @@ -74,24 +74,31 @@ }, data: query }) -}; +} -// 閫�鍑洪泦缇� export const leave = (query: any) => { return request({ url: "/data/api-v/cluster/leave", method: "post", data: query }) -}; +} +// 鑾峰彇ES闆嗙兢淇℃伅 +export const update2Master = (data: any) => { + return request({ + url: "/data/api-v/cluster/update2Master", + method: "post", + data + }) +} // 鑾峰彇婕傜Щip璁剧疆 export const getVrrp = () => { return request({ url: "/vrrp", method: "get" }) -}; +} // 璁剧疆婕傜Щip璁剧疆 export const setVrrp = (data: any) => { @@ -100,4 +107,31 @@ method: "post", data }) -} \ No newline at end of file +} + +// 鍒涘缓ES闆嗙兢 +export const createESNode = (data: any) => { + return request({ + url: "/data/api-v/es/createNode", + method: "post", + data + }) +} + +// 鍔犲叆ES闆嗙兢 +export const addESNode = (data: any) => { + return request({ + url: "/data/api-v/es/addCluster", + method: "post", + data + }) +} + +// 鑾峰彇ES闆嗙兢淇℃伅 +export const getEsClusterInfo = (data: any) => { + return request({ + url: "/data/api-v/es/getEsClusterInfo", + method: "post", + data + }) +} -- Gitblit v1.8.0