Merge branch 'master' into credential
This commit is contained in:
commit
46432da7aa
|
@ -86,7 +86,7 @@ func (handler APIHandler) ElasticsearchOverviewAction(w http.ResponseWriter, req
|
||||||
if err != nil{
|
if err != nil{
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
}
|
}
|
||||||
if v, ok := hostCount.(float64); ok && v == 0 {
|
if v, ok := hostCount.(float64); (ok && v == 0) || hostCount == nil {
|
||||||
hostCount, err = handler.getMetricCount(orm.GetIndexName(elastic.NodeConfig{}), "metadata.host", clusterIDs)
|
hostCount, err = handler.getMetricCount(orm.GetIndexName(elastic.NodeConfig{}), "metadata.host", clusterIDs)
|
||||||
if err != nil{
|
if err != nil{
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
|
|
|
@ -417,7 +417,15 @@ func (module *Module) initialize(w http.ResponseWriter, r *http.Request, ps http
|
||||||
|
|
||||||
if dslWriteSuccess{
|
if dslWriteSuccess{
|
||||||
lines := util.FileGetLines(dslFile)
|
lines := util.FileGetLines(dslFile)
|
||||||
_,err,_:=replay.ReplayLines(pipeline.AcquireContext(),lines,cfg.Schema,cfg.Host)
|
var (
|
||||||
|
username string
|
||||||
|
password string
|
||||||
|
)
|
||||||
|
if cfg.BasicAuth != nil {
|
||||||
|
username = cfg.BasicAuth.Username
|
||||||
|
password = cfg.BasicAuth.Password
|
||||||
|
}
|
||||||
|
_,err,_:=replay.ReplayLines(pipeline.AcquireContext(),lines,cfg.Schema,cfg.Host,username,password)
|
||||||
if err!=nil{
|
if err!=nil{
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue