sunty
2019-11-01 4ef2335cda0f7956082d334400c8ceb12cc465c7
Merge remote-tracking branch 'origin/master'
1个文件已修改
32 ■■■■■ 已修改文件
controllers/es.go 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/es.go
@@ -163,7 +163,16 @@
    return dataSource
}
//查询ES集群信息-入口
// @Security ApiKeyAuth
// @Summary 查询ES集群信息-入口
// @Description  查询ES集群信息-入口
// @Accept  json
// @Produce json
// @Tags es
// @Param obj body controllers.EsClusterInfo true "查询集群参数"
// @Success 200 {string} json "{"code":200, msg:"", success:true}"
// @Failure 500 {string} json "{"code":500, msg:"", success:false}"
// @Router /data/api-v/es/getEsClusterInfo [POST]
func (em *EsManagementController) GetEsClusterInfo(c *gin.Context) {
    var body EsClusterInfo
    c.BindJSON(&body)
@@ -230,7 +239,15 @@
    return nodeInfos, err
}
//创建节点
// @Security ApiKeyAuth
// @Summary 创建节点
// @Description  创建节点
// @Accept  json
// @Produce json
// @Tags es
// @Success 200 {string} json "{"code":200, msg:"", success:true}"
// @Failure 500 {string} json "{"code":500, msg:"", success:false}"
// @Router /data/api-v/es/createNode [POST]
func (em *EsManagementController) CreateNode(c *gin.Context) {
    msg := "创建节点失败,请联系管理员"
    str := "sh /opt/script/create_first_node.sh"
@@ -252,7 +269,16 @@
    util.ResponseFormat(c, code.CreateFirstNodeErr, msg)
}
//加入集群
// @Security ApiKeyAuth
// @Summary 加入集群
// @Description  加入集群
// @Accept  json
// @Produce json
// @Tags es
// @Param obj body controllers.AddCluster true "加入集群参数"
// @Success 200 {string} json "{"code":200, msg:"", success:true}"
// @Failure 500 {string} json "{"code":500, msg:"", success:false}"
// @Router /data/api-v/es/addCluster [POST]
func (em *EsManagementController) AddCluster(c *gin.Context) {
    var ac AddCluster
    err := c.BindJSON(&ac)