zhangzengfei
2023-10-23 1db7db4bf02259e47d5d906d6b21ecc6451b0a09
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
  })
};
}
// 调search后,通过此接口获取查到的集群节点信息
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
  })
}
}