remove unused code
This commit is contained in:
parent
c2f1869334
commit
b1961bc926
|
@ -119,20 +119,11 @@ func (h *APIHandler) getInstallScript(w http.ResponseWriter, req *http.Request,
|
||||||
if downloadURL == "" {
|
if downloadURL == "" {
|
||||||
downloadURL = "https://release.infinilabs.com/agent/stable/"
|
downloadURL = "https://release.infinilabs.com/agent/stable/"
|
||||||
}
|
}
|
||||||
//esCfg := elastic.GetConfig(global.MustLookupString(elastic.GlobalSystemElasticsearchID))
|
|
||||||
//var (
|
|
||||||
// loggingESUser string
|
|
||||||
// loggingESPassword string
|
|
||||||
//)
|
|
||||||
//if esCfg.BasicAuth != nil {
|
|
||||||
// loggingESUser = esCfg.BasicAuth.Username
|
|
||||||
// loggingESPassword = esCfg.BasicAuth.Password
|
|
||||||
//}
|
|
||||||
port := agCfg.Setup.Port
|
port := agCfg.Setup.Port
|
||||||
if port == "" {
|
if port == "" {
|
||||||
port = "8080"
|
port = "8080"
|
||||||
}
|
}
|
||||||
tpl.Execute(w, map[string]interface{}{
|
_, err = tpl.Execute(w, map[string]interface{}{
|
||||||
"base_url": agCfg.Setup.DownloadURL,
|
"base_url": agCfg.Setup.DownloadURL,
|
||||||
"agent_version": agCfg.Setup.Version,
|
"agent_version": agCfg.Setup.Version,
|
||||||
"console_endpoint": agCfg.Setup.ConsoleEndpoint,
|
"console_endpoint": agCfg.Setup.ConsoleEndpoint,
|
||||||
|
@ -141,9 +132,9 @@ func (h *APIHandler) getInstallScript(w http.ResponseWriter, req *http.Request,
|
||||||
"ca_crt": caCert,
|
"ca_crt": caCert,
|
||||||
"port": port,
|
"port": port,
|
||||||
"token": tokenStr,
|
"token": tokenStr,
|
||||||
//"logging_es_endpoint": esCfg.Endpoint,
|
|
||||||
//"logging_es_user": loggingESUser,
|
|
||||||
//"logging_es_password": loggingESPassword,
|
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,22 +203,6 @@ func (sm *StateManager) syncSettings(agentID string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = agClient.SaveDynamicConfig(context.Background(), ag.GetEndpoint(), "dynamic_task", string(cfgBytes))
|
err = agClient.SaveDynamicConfig(context.Background(), ag.GetEndpoint(), "dynamic_task", string(cfgBytes))
|
||||||
//for _, pipelineID := range parseResult.ToDeletePipelineNames {
|
|
||||||
// err = agClient.DeletePipeline(context.Background(), ag.GetEndpoint(), pipelineID)
|
|
||||||
// if err != nil {
|
|
||||||
// if !strings.Contains(err.Error(), "not found") {
|
|
||||||
// log.Errorf("delete pipeline error: %v", err)
|
|
||||||
// continue
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//for _, pipeline := range parseResult.Pipelines {
|
|
||||||
// err = agClient.CreatePipeline(context.Background(), ag.GetEndpoint(), util.MustToJSONBytes(pipeline))
|
|
||||||
// if err != nil {
|
|
||||||
// log.Errorf("create pipeline error: %v", err)
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
sm.timestamps[agentID] = newTimestamp
|
sm.timestamps[agentID] = newTimestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue