import request from "@/scripts/httpRequest";
|
import qs from "qs";
|
|
// 获取随机密码
|
export const randomPwd = (query: any) => {
|
return request({
|
url: "/data/api-v/cluster/randomPwd",
|
method: "get",
|
params: query
|
});
|
};
|
|
// 创建集群
|
export const createSerfCluster = (query: any) => {
|
return request({
|
url: "/data/api-v/cluster/create",
|
method: "post",
|
data: query
|
})
|
};
|
|
// 搜索集群
|
export const search = (query: any) => {
|
return request({
|
url: "/data/api-v/cluster/search",
|
method: "post",
|
data: query
|
})
|
};
|
|
// 调search后,通过此接口获取查到的集群节点信息
|
export const getSearchNodes = (query: any) => {
|
return request({
|
url: "/data/api-v/cluster/getSearchNodes",
|
method: "get",
|
params: query
|
});
|
};
|
|
// 停止搜索
|
export const stopSearching = (query: any) => {
|
return request({
|
url: "/data/api-v/cluster/stopSearching",
|
method: "post",
|
data: query
|
})
|
};
|
|
// 查询本地集群
|
export const findCluster = (query: any) => {
|
return request({
|
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',
|
data: qs.stringify(query)
|
})
|
};
|
|
// 加入集群
|
export const joinCluster = (query: any) => {
|
return request({
|
url: "/data/api-v/cluster/joinCluster",
|
method: "post",
|
headers: {
|
"Content-Type": "application/json; charset=UTF-8"
|
},
|
data: query
|
})
|
};
|
|
// 退出集群
|
export const leave = (query: any) => {
|
return request({
|
url: "/data/api-v/cluster/leave",
|
method: "post",
|
data: query
|
})
|
};
|
|
// 获取漂移ip设置
|
export const getVrrp = () => {
|
return request({
|
url: "/vrrp",
|
method: "get"
|
})
|
};
|
|
// 设置漂移ip设置
|
export const setVrrp = (data: any) => {
|
return request({
|
url: "/vrrp",
|
method: "post",
|
data
|
})
|
}
|
|
// 创建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
|
})
|
}
|
|
//获取集群列表
|
export const getClusterDevList = () => {
|
return request({
|
url: "/saas/api-s/area/getClusterDevList",
|
method: "get",
|
})
|
}
|