ZZJ
2022-04-02 45faaf27722588e92050e2e3eace9b3704377048
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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",
  })
}