From 7ce84b3d1e45d35c7c9f73561893039a05c16995 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 20 十二月 2019 19:38:18 +0800
Subject: [PATCH] fix unTargz
---
controllers/taglist.go | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/controllers/taglist.go b/controllers/taglist.go
index beb54e6..689dae7 100644
--- a/controllers/taglist.go
+++ b/controllers/taglist.go
@@ -15,6 +15,7 @@
"github.com/gin-gonic/gin"
)
+// @Security ApiKeyAuth
// @Summary 鏍囩鍒楄〃
// @Description 杩斿洖搴曞簱鏍囩
// @Accept json
@@ -22,11 +23,11 @@
// @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/taskList [POST]
+// @Router /data/api-v/es/tagList [POST]
func (sc *EsSearchController) PostEsTagList(c *gin.Context) {
var dtApi dbapi.DbTableApi
- dts, err := dtApi.FindAllDbTablesByCurServer()
+ dts, err := dtApi.FindAllDbTablesByCurServer("-1")
if err == nil {
if dts !=nil {
sources := make([]map[string]interface{}, 0)
@@ -36,6 +37,8 @@
tokenRes["title"] = dt.TableName
tokenRes["value"] = dt.Id
tokenRes["status"] = dt.IsDelete
+ tokenRes["bwType"] = dt.BwType //0锛氱櫧鍚嶅崟锛�1锛氶粦鍚嶅崟
+ tokenRes["analyServerId"] = dt.AnalyServerId //涓虹┖鏄悓姝ュ簱锛屼笉涓虹┖鏄湰鍦板簱
if dt.IsDelete == 1 {
if GetTotalFromDb(dt.Id) == false {
continue
@@ -54,12 +57,12 @@
func GetTotalFromDb(id string) (flag bool) {
flag = false
localConf, err2 := cache.GetServerInfo()
- if err2 !=nil || localConf.AlarmIp == "" {
+ if err2 !=nil || localConf.AlarmIp == "" || localConf.ServerId == "" {
logger.Debug("localConfig is wrong!!!")
return false
}
url := "http://" + localConf.AlarmIp + ":" + strconv.Itoa(int(localConf.AlarmPort)) +
- "/" + config.EsInfo.EsIndex.VideoPersons.IndexName + "/_search"
+ "/" + config.EsInfo.EsIndex.AiOcean.IndexName + "/_search"
prama := "{\"query\":{\"bool\":{\"filter\":[{\"term\":{\"baseInfo.tableId\":\"" + id + "\"}}]}},\"size\":0}"
buf, err := esutil.EsReq("POST", url, []byte(prama))
if err != nil {
--
Gitblit v1.8.0