|
|
|
@ -5,7 +5,6 @@ import (
|
|
|
|
|
"dsSupport/MyModel/DataSource/DatasourceService"
|
|
|
|
|
"dsSupport/MyModel/MySwagger"
|
|
|
|
|
"dsSupport/Utils/ES7Util"
|
|
|
|
|
"fmt"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type ESDataContent struct {
|
|
|
|
@ -27,18 +26,16 @@ func GetESDocCount() (bool, []map[string]interface{}) {
|
|
|
|
|
rr, _, _, datasources, _ := DatasourceService.GetDatasourceResults(sw)
|
|
|
|
|
if rr == true {
|
|
|
|
|
for _, vv := range datasources {
|
|
|
|
|
fmt.Println(vv["datasource_code"])
|
|
|
|
|
fmt.Println(vv["datasource_name"])
|
|
|
|
|
result, _ := ES7Util.GetDocCount(vv["datasource_code"].(string))
|
|
|
|
|
num += result
|
|
|
|
|
_, _, esdata := ES7Util.GetLatestDoc(vv["datasource_code"].(string))
|
|
|
|
|
fmt.Println(esdata.BeginTime)
|
|
|
|
|
|
|
|
|
|
data = make(map[string]interface{})
|
|
|
|
|
data["system_name"] = v["app_name"]
|
|
|
|
|
data["system_id"] = v["app_id"]
|
|
|
|
|
data["datasource_code"] = vv["datasource_code"]
|
|
|
|
|
data["datasource_name"] = vv["datasource_name"]
|
|
|
|
|
data["datasource_id"] = vv["id"]
|
|
|
|
|
data["storage_time"] = esdata.BeginTime
|
|
|
|
|
data["num"] = result
|
|
|
|
|
datas = append(datas, data)
|
|
|
|
|