From 1605fa5102e7d5d76a02456130097d3ab82c2a2b Mon Sep 17 00:00:00 2001 From: David Meza Date: Tue, 5 Sep 2017 19:28:46 -0500 Subject: Configs for themes in `Display Settings`: hide themes options, hide custom themes, specific list of themes (#7173) * Add configuration to enable or disable choosing themes in Display Settings. Only for Licensed servers. * Add configuration to enable or disable choosing custom themes in Display Settings. Only for Licensed servers. * Add configuration to enable or disable a specific list of themes to choose in Display Settings. Only for Licensed servers. * Added config value and logic for "DefaultTheme" * Fix problem with undefined values when the server is not licensed --- app/diagnostics.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/diagnostics.go') diff --git a/app/diagnostics.go b/app/diagnostics.go index 713d8aa26..98043d0a0 100644 --- a/app/diagnostics.go +++ b/app/diagnostics.go @@ -26,6 +26,7 @@ const ( TRACK_CONFIG_RATE = "config_rate" TRACK_CONFIG_EMAIL = "config_email" TRACK_CONFIG_PRIVACY = "config_privacy" + TRACK_CONFIG_THEME = "config_theme" TRACK_CONFIG_OAUTH = "config_oauth" TRACK_CONFIG_LDAP = "config_ldap" TRACK_CONFIG_COMPLIANCE = "config_compliance" @@ -331,6 +332,13 @@ func trackConfig() { "show_full_name": utils.Cfg.PrivacySettings.ShowFullName, }) + SendDiagnostic(TRACK_CONFIG_THEME, map[string]interface{}{ + "enable_theme_selection": *utils.Cfg.ThemeSettings.EnableThemeSelection, + "isdefault_default_theme": isDefault(*utils.Cfg.ThemeSettings.DefaultTheme, model.TEAM_SETTINGS_DEFAULT_TEAM_TEXT), + "allow_custom_themes": *utils.Cfg.ThemeSettings.AllowCustomThemes, + "allowed_themes": len(utils.Cfg.ThemeSettings.AllowedThemes), + }) + SendDiagnostic(TRACK_CONFIG_OAUTH, map[string]interface{}{ "enable_gitlab": utils.Cfg.GitLabSettings.Enable, "enable_google": utils.Cfg.GoogleSettings.Enable, -- cgit v1.2.3-1-g7c22