PLT-3753 Added Segment analytics (#3972)
Этот коммит содержится в:
@@ -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
|
||||
};
|
||||
}
|
||||
@@ -47,24 +44,6 @@ export default class ExternalServiceSettings extends AdminSettings {
|
||||
renderSettings() {
|
||||
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={
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -463,6 +463,8 @@
|
||||
"admin.log.consoleTitle": "Output logs to console: ",
|
||||
"admin.log.enableWebhookDebugging": "Enable Webhook Debugging:",
|
||||
"admin.log.enableWebhookDebuggingDescription": "You can set this to false to disable the debug logging of all incoming webhook request bodies.",
|
||||
"admin.log.enableDiagnostics": "Enable Diagnostics and Error Reporting:",
|
||||
"admin.log.enableDiagnosticsDescription": "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.",
|
||||
"admin.log.fileDescription": "Typically set to true in production. When true, log files are written to the log file specified in file location field below.",
|
||||
"admin.log.fileLevelDescription": "This setting determines the level of detail at which log events are written to the log file. ERROR: Outputs only error messages. INFO: Outputs error messages and information around startup and initialization. DEBUG: Prints high detail for developers working on debugging issues.",
|
||||
"admin.log.fileLevelTitle": "File Log Level:",
|
||||
|
||||
Ссылка в новой задаче
Block a user