diff --git a/quesma/quesma/ui/console_routes.go b/quesma/quesma/ui/console_routes.go index 8b730ea8f..18b30ff23 100644 --- a/quesma/quesma/ui/console_routes.go +++ b/quesma/quesma/ui/console_routes.go @@ -23,6 +23,7 @@ const ( uiTcpPort = "9999" managementInternalPath = "/_quesma" healthPath = managementInternalPath + "/health" + loginWithElasticSearch = "/login-with-elasticsearch" ) //go:embed asset/* @@ -70,7 +71,7 @@ func (qmc *QuesmaManagementConsole) createRouting() *mux.Router { router.HandleFunc("/auth/{provider}/callback", authCallbackHandler) // our logic for login - router.HandleFunc("/login-with-elasticsearch", qmc.HandleElasticsearchLogin) + router.HandleFunc(loginWithElasticSearch, qmc.HandleElasticsearchLogin) authenticatedRoutes := router.PathPrefix("/").Subrouter() if qmc.cfg.Elasticsearch.User == "" && qmc.cfg.Elasticsearch.Password == "" { diff --git a/quesma/quesma/ui/es_auth_provider.go b/quesma/quesma/ui/es_auth_provider.go index 966f6375d..12b2afb59 100644 --- a/quesma/quesma/ui/es_auth_provider.go +++ b/quesma/quesma/ui/es_auth_provider.go @@ -25,7 +25,7 @@ func NewElasticsearchAuthProvider() *ElasticsearchAuthProvider { type ElasticsearchSession struct{} func (e ElasticsearchSession) GetAuthURL() (string, error) { - return "http://localhost:9999/login-with-elasticsearch", nil + return loginWithElasticSearch, nil } func (e ElasticsearchSession) Marshal() string { diff --git a/quesma/quesma/ui/html_utils.go b/quesma/quesma/ui/html_utils.go index 56a21f496..28dab3790 100644 --- a/quesma/quesma/ui/html_utils.go +++ b/quesma/quesma/ui/html_utils.go @@ -85,8 +85,6 @@ func (qmc *QuesmaManagementConsole) generateTopNavigation(target string) []byte buffer.Html(abTestingPath) buffer.Html(`">A/B`) - buffer.Html(`
Log in to Quesma admin console using your Elasticsearch credentials
`) - buffer.Html(`