summaryrefslogtreecommitdiffstats
path: root/app/diagnostics.go
diff options
context:
space:
mode:
authorJason Blais <13119842+jasonblais@users.noreply.github.com>2018-08-01 14:17:24 -0400
committerChristopher Speller <crspeller@gmail.com>2018-08-01 11:17:24 -0700
commitb59044e88959cde107c47a699b28ebe781e0aa3e (patch)
tree45b56e07bd8a90e3f13089749549b6dec8f61689 /app/diagnostics.go
parentecfba2c2e9e46389e2012e9adf1ab993aaa7ea5e (diff)
downloadchat-b59044e88959cde107c47a699b28ebe781e0aa3e.tar.gz
chat-b59044e88959cde107c47a699b28ebe781e0aa3e.tar.bz2
chat-b59044e88959cde107c47a699b28ebe781e0aa3e.zip
Add missing diagnostics for v5.2 (#9200)
* Update diagnostics.go * Fix gofmt
Diffstat (limited to 'app/diagnostics.go')
-rw-r--r--app/diagnostics.go85
1 files changed, 47 insertions, 38 deletions
diff --git a/app/diagnostics.go b/app/diagnostics.go
index 95113ec68..91341c310 100644
--- a/app/diagnostics.go
+++ b/app/diagnostics.go
@@ -22,6 +22,7 @@ const (
TRACK_CONFIG_LOG = "config_log"
TRACK_CONFIG_FILE = "config_file"
TRACK_CONFIG_RATE = "config_rate"
+ TRACK_CONFIG_EXTENSION = "config_extension"
TRACK_CONFIG_EMAIL = "config_email"
TRACK_CONFIG_PRIVACY = "config_privacy"
TRACK_CONFIG_THEME = "config_theme"
@@ -190,44 +191,47 @@ func (a *App) trackActivity() {
func (a *App) trackConfig() {
cfg := a.Config()
a.SendDiagnostic(TRACK_CONFIG_SERVICE, map[string]interface{}{
- "web_server_mode": *cfg.ServiceSettings.WebserverMode,
- "enable_security_fix_alert": *cfg.ServiceSettings.EnableSecurityFixAlert,
- "enable_insecure_outgoing_connections": *cfg.ServiceSettings.EnableInsecureOutgoingConnections,
- "enable_incoming_webhooks": cfg.ServiceSettings.EnableIncomingWebhooks,
- "enable_outgoing_webhooks": cfg.ServiceSettings.EnableOutgoingWebhooks,
- "enable_commands": *cfg.ServiceSettings.EnableCommands,
- "enable_only_admin_integrations": *cfg.ServiceSettings.EnableOnlyAdminIntegrations,
- "enable_post_username_override": cfg.ServiceSettings.EnablePostUsernameOverride,
- "enable_post_icon_override": cfg.ServiceSettings.EnablePostIconOverride,
- "enable_user_access_tokens": *cfg.ServiceSettings.EnableUserAccessTokens,
- "enable_custom_emoji": *cfg.ServiceSettings.EnableCustomEmoji,
- "enable_emoji_picker": *cfg.ServiceSettings.EnableEmojiPicker,
- "enable_gif_picker": *cfg.ServiceSettings.EnableGifPicker,
- "gfycat_api_key": isDefault(*cfg.ServiceSettings.GfycatApiKey, model.SERVICE_SETTINGS_DEFAULT_GFYCAT_API_KEY),
- "gfycat_api_secret": isDefault(*cfg.ServiceSettings.GfycatApiSecret, model.SERVICE_SETTINGS_DEFAULT_GFYCAT_API_SECRET),
- "experimental_enable_authentication_transfer": *cfg.ServiceSettings.ExperimentalEnableAuthenticationTransfer,
- "restrict_custom_emoji_creation": *cfg.ServiceSettings.RestrictCustomEmojiCreation,
- "enable_testing": cfg.ServiceSettings.EnableTesting,
- "enable_developer": *cfg.ServiceSettings.EnableDeveloper,
- "enable_multifactor_authentication": *cfg.ServiceSettings.EnableMultifactorAuthentication,
- "enforce_multifactor_authentication": *cfg.ServiceSettings.EnforceMultifactorAuthentication,
- "enable_oauth_service_provider": cfg.ServiceSettings.EnableOAuthServiceProvider,
- "connection_security": *cfg.ServiceSettings.ConnectionSecurity,
- "uses_letsencrypt": *cfg.ServiceSettings.UseLetsEncrypt,
- "forward_80_to_443": *cfg.ServiceSettings.Forward80To443,
- "maximum_login_attempts": *cfg.ServiceSettings.MaximumLoginAttempts,
- "session_length_web_in_days": *cfg.ServiceSettings.SessionLengthWebInDays,
- "session_length_mobile_in_days": *cfg.ServiceSettings.SessionLengthMobileInDays,
- "session_length_sso_in_days": *cfg.ServiceSettings.SessionLengthSSOInDays,
- "session_cache_in_minutes": *cfg.ServiceSettings.SessionCacheInMinutes,
- "session_idle_timeout_in_minutes": *cfg.ServiceSettings.SessionIdleTimeoutInMinutes,
- "isdefault_site_url": isDefault(*cfg.ServiceSettings.SiteURL, model.SERVICE_SETTINGS_DEFAULT_SITE_URL),
- "isdefault_tls_cert_file": isDefault(*cfg.ServiceSettings.TLSCertFile, model.SERVICE_SETTINGS_DEFAULT_TLS_CERT_FILE),
- "isdefault_tls_key_file": isDefault(*cfg.ServiceSettings.TLSKeyFile, model.SERVICE_SETTINGS_DEFAULT_TLS_KEY_FILE),
- "isdefault_read_timeout": isDefault(*cfg.ServiceSettings.ReadTimeout, model.SERVICE_SETTINGS_DEFAULT_READ_TIMEOUT),
- "isdefault_write_timeout": isDefault(*cfg.ServiceSettings.WriteTimeout, model.SERVICE_SETTINGS_DEFAULT_WRITE_TIMEOUT),
- "isdefault_google_developer_key": isDefault(cfg.ServiceSettings.GoogleDeveloperKey, ""),
- "isdefault_allow_cors_from": isDefault(*cfg.ServiceSettings.AllowCorsFrom, model.SERVICE_SETTINGS_DEFAULT_ALLOW_CORS_FROM),
+ "web_server_mode": *cfg.ServiceSettings.WebserverMode,
+ "enable_security_fix_alert": *cfg.ServiceSettings.EnableSecurityFixAlert,
+ "enable_insecure_outgoing_connections": *cfg.ServiceSettings.EnableInsecureOutgoingConnections,
+ "enable_incoming_webhooks": cfg.ServiceSettings.EnableIncomingWebhooks,
+ "enable_outgoing_webhooks": cfg.ServiceSettings.EnableOutgoingWebhooks,
+ "enable_commands": *cfg.ServiceSettings.EnableCommands,
+ "enable_only_admin_integrations": *cfg.ServiceSettings.EnableOnlyAdminIntegrations,
+ "enable_post_username_override": cfg.ServiceSettings.EnablePostUsernameOverride,
+ "enable_post_icon_override": cfg.ServiceSettings.EnablePostIconOverride,
+ "enable_user_access_tokens": *cfg.ServiceSettings.EnableUserAccessTokens,
+ "enable_custom_emoji": *cfg.ServiceSettings.EnableCustomEmoji,
+ "enable_emoji_picker": *cfg.ServiceSettings.EnableEmojiPicker,
+ "enable_gif_picker": *cfg.ServiceSettings.EnableGifPicker,
+ "gfycat_api_key": isDefault(*cfg.ServiceSettings.GfycatApiKey, model.SERVICE_SETTINGS_DEFAULT_GFYCAT_API_KEY),
+ "gfycat_api_secret": isDefault(*cfg.ServiceSettings.GfycatApiSecret, model.SERVICE_SETTINGS_DEFAULT_GFYCAT_API_SECRET),
+ "experimental_enable_authentication_transfer": *cfg.ServiceSettings.ExperimentalEnableAuthenticationTransfer,
+ "restrict_custom_emoji_creation": *cfg.ServiceSettings.RestrictCustomEmojiCreation,
+ "enable_testing": cfg.ServiceSettings.EnableTesting,
+ "enable_developer": *cfg.ServiceSettings.EnableDeveloper,
+ "enable_multifactor_authentication": *cfg.ServiceSettings.EnableMultifactorAuthentication,
+ "enforce_multifactor_authentication": *cfg.ServiceSettings.EnforceMultifactorAuthentication,
+ "enable_oauth_service_provider": cfg.ServiceSettings.EnableOAuthServiceProvider,
+ "connection_security": *cfg.ServiceSettings.ConnectionSecurity,
+ "uses_letsencrypt": *cfg.ServiceSettings.UseLetsEncrypt,
+ "forward_80_to_443": *cfg.ServiceSettings.Forward80To443,
+ "maximum_login_attempts": *cfg.ServiceSettings.MaximumLoginAttempts,
+ "session_length_web_in_days": *cfg.ServiceSettings.SessionLengthWebInDays,
+ "session_length_mobile_in_days": *cfg.ServiceSettings.SessionLengthMobileInDays,
+ "session_length_sso_in_days": *cfg.ServiceSettings.SessionLengthSSOInDays,
+ "session_cache_in_minutes": *cfg.ServiceSettings.SessionCacheInMinutes,
+ "session_idle_timeout_in_minutes": *cfg.ServiceSettings.SessionIdleTimeoutInMinutes,
+ "isdefault_site_url": isDefault(*cfg.ServiceSettings.SiteURL, model.SERVICE_SETTINGS_DEFAULT_SITE_URL),
+ "isdefault_tls_cert_file": isDefault(*cfg.ServiceSettings.TLSCertFile, model.SERVICE_SETTINGS_DEFAULT_TLS_CERT_FILE),
+ "isdefault_tls_key_file": isDefault(*cfg.ServiceSettings.TLSKeyFile, model.SERVICE_SETTINGS_DEFAULT_TLS_KEY_FILE),
+ "isdefault_read_timeout": isDefault(*cfg.ServiceSettings.ReadTimeout, model.SERVICE_SETTINGS_DEFAULT_READ_TIMEOUT),
+ "isdefault_write_timeout": isDefault(*cfg.ServiceSettings.WriteTimeout, model.SERVICE_SETTINGS_DEFAULT_WRITE_TIMEOUT),
+ "isdefault_google_developer_key": isDefault(cfg.ServiceSettings.GoogleDeveloperKey, ""),
+ "isdefault_allow_cors_from": isDefault(*cfg.ServiceSettings.AllowCorsFrom, model.SERVICE_SETTINGS_DEFAULT_ALLOW_CORS_FROM),
+ "isdefault_cors_exposed_headers": isDefault(cfg.ServiceSettings.CorsExposedHeaders, ""),
+ "cors_allow_credentials": *cfg.ServiceSettings.CorsAllowCredentials,
+ "cors_debug": *cfg.ServiceSettings.CorsDebug,
"isdefault_allowed_untrusted_internal_connections": isDefault(*cfg.ServiceSettings.AllowedUntrustedInternalConnections, ""),
"restrict_post_delete": *cfg.ServiceSettings.RestrictPostDelete,
"allow_edit_post": *cfg.ServiceSettings.AllowEditPost,
@@ -274,6 +278,7 @@ func (a *App) trackConfig() {
"max_users_per_team": *cfg.TeamSettings.MaxUsersPerTeam,
"max_channels_per_team": *cfg.TeamSettings.MaxChannelsPerTeam,
"teammate_name_display": *cfg.TeamSettings.TeammateNameDisplay,
+ "view_archived_channels": *cfg.TeamSettings.ViewArchivedChannels,
"isdefault_site_name": isDefault(cfg.TeamSettings.SiteName, "Mattermost"),
"isdefault_custom_brand_text": isDefault(*cfg.TeamSettings.CustomBrandText, model.TEAM_SETTINGS_DEFAULT_CUSTOM_BRAND_TEXT),
"isdefault_custom_description_text": isDefault(*cfg.TeamSettings.CustomDescriptionText, model.TEAM_SETTINGS_DEFAULT_CUSTOM_DESCRIPTION_TEXT),
@@ -366,6 +371,10 @@ func (a *App) trackConfig() {
"isdefault_login_button_text_color": isDefault(*cfg.EmailSettings.LoginButtonTextColor, ""),
})
+ a.SendDiagnostic(TRACK_CONFIG_EXTENSION, map[string]interface{}{
+ "enable_experimental_extensions": *cfg.ExtensionSettings.EnableExperimentalExtensions,
+ })
+
a.SendDiagnostic(TRACK_CONFIG_RATE, map[string]interface{}{
"enable_rate_limiter": *cfg.RateLimitSettings.Enable,
"vary_by_remote_address": *cfg.RateLimitSettings.VaryByRemoteAddr,