From c506c5cac6627a42af778d744cdd36d6d7abaeb2 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Mon, 31 Jul 2017 16:53:44 +0100 Subject: PLT-6961: Add Elasticsearch settings to diagnostics. (#7021) --- model/config.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'model') diff --git a/model/config.go b/model/config.go index 02af64477..1e091785f 100644 --- a/model/config.go +++ b/model/config.go @@ -118,6 +118,10 @@ const ( ANNOUNCEMENT_SETTINGS_DEFAULT_BANNER_COLOR = "#f2a93b" ANNOUNCEMENT_SETTINGS_DEFAULT_BANNER_TEXT_COLOR = "#333333" + + ELASTICSEARCH_SETTINGS_DEFAULT_CONNECTION_URL = "" + ELASTICSEARCH_SETTINGS_DEFAULT_USERNAME = "" + ELASTICSEARCH_SETTINGS_DEFAULT_PASSWORD = "" ) type ServiceSettings struct { @@ -1379,17 +1383,17 @@ func (o *Config) SetDefaults() { if o.ElasticsearchSettings.ConnectionUrl == nil { o.ElasticsearchSettings.ConnectionUrl = new(string) - *o.ElasticsearchSettings.ConnectionUrl = "" + *o.ElasticsearchSettings.ConnectionUrl = ELASTICSEARCH_SETTINGS_DEFAULT_CONNECTION_URL } if o.ElasticsearchSettings.Username == nil { o.ElasticsearchSettings.Username = new(string) - *o.ElasticsearchSettings.Username = "" + *o.ElasticsearchSettings.Username = ELASTICSEARCH_SETTINGS_DEFAULT_USERNAME } if o.ElasticsearchSettings.Password == nil { o.ElasticsearchSettings.Password = new(string) - *o.ElasticsearchSettings.Password = "" + *o.ElasticsearchSettings.Password = ELASTICSEARCH_SETTINGS_DEFAULT_PASSWORD } if o.ElasticsearchSettings.EnableIndexing == nil { -- cgit v1.2.3-1-g7c22