summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console
diff options
context:
space:
mode:
authorDavid Lu <david.lu97@outlook.com>2016-09-06 18:51:27 -0400
committerenahum <nahumhbl@gmail.com>2016-09-06 19:51:27 -0300
commit51501f920c092791c7d83ac7067874547a37c96a (patch)
tree8665cdc82c4fa99ba5c2b6743c66e0912fd53ddb /webapp/components/admin_console
parent47d77d258961f95f4348b4745da062c08731b283 (diff)
downloadchat-51501f920c092791c7d83ac7067874547a37c96a.tar.gz
chat-51501f920c092791c7d83ac7067874547a37c96a.tar.bz2
chat-51501f920c092791c7d83ac7067874547a37c96a.zip
PLT-3753 Added Segment analytics (#3972)
Diffstat (limited to 'webapp/components/admin_console')
-rw-r--r--webapp/components/admin_console/external_service_settings.jsx21
-rw-r--r--webapp/components/admin_console/log_settings.jsx23
2 files changed, 21 insertions, 23 deletions
diff --git a/webapp/components/admin_console/external_service_settings.jsx b/webapp/components/admin_console/external_service_settings.jsx
index 59a129fc0..53fdbfb53 100644
--- a/webapp/components/admin_console/external_service_settings.jsx
+++ b/webapp/components/admin_console/external_service_settings.jsx
@@ -20,15 +20,12 @@ export default class ExternalServiceSettings extends AdminSettings {
}
getConfigFromState(config) {
- config.ServiceSettings.SegmentDeveloperKey = this.state.segmentDeveloperKey;
config.ServiceSettings.GoogleDeveloperKey = this.state.googleDeveloperKey;
-
return config;
}
getStateFromConfig(config) {
return {
- segmentDeveloperKey: config.ServiceSettings.SegmentDeveloperKey,
googleDeveloperKey: config.ServiceSettings.GoogleDeveloperKey
};
}
@@ -48,24 +45,6 @@ export default class ExternalServiceSettings extends AdminSettings {
return (
<SettingsGroup>
<TextSetting
- id='segmentDeveloperKey'
- label={
- <FormattedMessage
- id='admin.service.segmentTitle'
- defaultMessage='Segment Write Key:'
- />
- }
- placeholder={Utils.localizeMessage('admin.service.segmentExample', 'Ex "g3fgGOXJAQ43QV7rAh6iwQCkV4cA1Gs"')}
- helpText={
- <FormattedMessage
- id='admin.service.segmentDescription'
- defaultMessage='Segment.com is an online service that can be optionally used to track detailed system statistics. You can obtain a key by signing-up for a free account at Segment.com.'
- />
- }
- value={this.state.segmentDeveloperKey}
- onChange={this.handleChange}
- />
- <TextSetting
id='googleDeveloperKey'
label={
<FormattedMessage
diff --git a/webapp/components/admin_console/log_settings.jsx b/webapp/components/admin_console/log_settings.jsx
index 31abca316..135369942 100644
--- a/webapp/components/admin_console/log_settings.jsx
+++ b/webapp/components/admin_console/log_settings.jsx
@@ -8,7 +8,7 @@ import * as Utils from 'utils/utils.jsx';
import AdminSettings from './admin_settings.jsx';
import BooleanSetting from './boolean_setting.jsx';
import DropdownSetting from './dropdown_setting.jsx';
-import {FormattedMessage} from 'react-intl';
+import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
import SettingsGroup from './settings_group.jsx';
import TextSetting from './text_setting.jsx';
@@ -29,6 +29,7 @@ export default class LogSettings extends AdminSettings {
config.LogSettings.FileLocation = this.state.fileLocation;
config.LogSettings.FileFormat = this.state.fileFormat;
config.LogSettings.EnableWebhookDebugging = this.state.enableWebhookDebugging;
+ config.LogSettings.EnableDiagnostics = this.state.enableDiagnostics;
return config;
}
@@ -41,7 +42,8 @@ export default class LogSettings extends AdminSettings {
fileLevel: config.LogSettings.FileLevel,
fileLocation: config.LogSettings.FileLocation,
fileFormat: config.LogSettings.FileFormat,
- enableWebhookDebugging: config.LogSettings.EnableWebhookDebugging
+ enableWebhookDebugging: config.LogSettings.EnableWebhookDebugging,
+ enableDiagnostics: config.LogSettings.EnableDiagnostics
};
}
@@ -187,6 +189,23 @@ export default class LogSettings extends AdminSettings {
value={this.state.enableWebhookDebugging}
onChange={this.handleChange}
/>
+ <BooleanSetting
+ id='enableDiagnostics'
+ label={
+ <FormattedMessage
+ id='admin.log.enableDiagnostics'
+ defaultMessage='Enable Diagnostics and Error Reporting:'
+ />
+ }
+ helpText={
+ <FormattedHTMLMessage
+ id='admin.log.enableDiagnosticsDescription'
+ defaultMessage='Enable this feature to improve the quality and performance of Mattermost by sending error reporting and diagnostic information to Mattermost, Inc. Read our <a href="https://about.mattermost.com/default-privacy-policy/" target="_blank">privacy policy</a> to learn more.'
+ />
+ }
+ value={this.state.enableDiagnostics}
+ onChange={this.handleChange}
+ />
</SettingsGroup>
);
}