From 1db7db4bf02259e47d5d906d6b21ecc6451b0a09 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期一, 23 十月 2023 15:26:46 +0800 Subject: [PATCH] 添加集群手动选主节点, 无线网络显示ip --- src/api/clusterManage.ts | 44 ++++++++++++++++++++++++++------------------ 1 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/api/clusterManage.ts b/src/api/clusterManage.ts index 3c5300a..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,8 +7,8 @@ url: "/data/api-v/cluster/randomPwd", method: "get", params: query - }); -}; + }) +} // 鍒涘缓闆嗙兢 export const createSerfCluster = (query: any) => { @@ -17,7 +17,7 @@ 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,7 +74,7 @@ }, data: query }) -}; +} export const leave = (query: any) => { return request({ @@ -82,15 +82,23 @@ 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) => { @@ -126,4 +134,4 @@ method: "post", data }) -} \ No newline at end of file +} -- Gitblit v1.8.0