* PLT-3647 Added config settings for email batching * PLT-3647 Refactored generation of email notification * PLT-3647 Added serverside code for email batching * PLT-3647 Updated settings UI to enable email batching * PLT-3647 Removed debug code * PLT-3647 Fixed 0-padding of minutes in batched notification * PLT-3647 Updated clientside UI for when email batching is disabled * Go fmt * PLT-3647 Changed email batching to be disabled by default * Updated batched email message * Added email batching toggle to system console * Changed Email Notifications > Immediate setting to a 30 second batch interval * Go fmt * Fixed link to Mattermost icon in batched email notification * Updated users to use 30 second email batching by default * Fully disabled email batching when clustering is enabled * Fixed email batching setting in the system console * Fixed casing of 'Send Email notifications' -> 'Send email notifications' * Updating UI Improvements for email batching (#3736) * Updated text for notification settings and SiteURL. * Prevented enabling email batching when SiteURL isn't set in the system console * Re-added a couple debug messages * Added warning text when clustering is enabled
94 строки
3.2 KiB
JavaScript
94 строки
3.2 KiB
JavaScript
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import React from 'react';
|
|
import * as Utils from 'utils/utils.jsx';
|
|
|
|
import DropdownSetting from './dropdown_setting.jsx';
|
|
import {FormattedMessage} from 'react-intl';
|
|
|
|
const CONNECTION_SECURITY_HELP_TEXT = (
|
|
<table
|
|
className='table table-bordered table-margin--none'
|
|
cellPadding='5'
|
|
>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<FormattedMessage
|
|
id='admin.connectionSecurityNone'
|
|
defaultMessage='None'
|
|
/>
|
|
</td>
|
|
<td>
|
|
<FormattedMessage
|
|
id='admin.connectionSecurityNoneDescription'
|
|
defaultMessage='Mattermost will connect over an unsecure connection.'
|
|
/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<FormattedMessage
|
|
id='admin.connectionSecurityTls'
|
|
defaultMessage='TLS'
|
|
/>
|
|
</td>
|
|
<td>
|
|
<FormattedMessage
|
|
id='admin.connectionSecurityTlsDescription'
|
|
defaultMessage='Encrypts the communication between Mattermost and your server.'
|
|
/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<FormattedMessage
|
|
id='admin.connectionSecurityStart'
|
|
defaultMessage='STARTTLS'
|
|
/>
|
|
</td>
|
|
<td>
|
|
<FormattedMessage
|
|
id='admin.connectionSecurityStartDescription'
|
|
defaultMessage='Takes an existing insecure connection and attempts to upgrade it to a secure connection using TLS.'
|
|
/>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
);
|
|
|
|
export default class ConnectionSecurityDropdownSetting extends React.Component {
|
|
render() {
|
|
return (
|
|
<DropdownSetting
|
|
id='connectionSecurity'
|
|
values={[
|
|
{value: '', text: Utils.localizeMessage('admin.connectionSecurityNone', 'None')},
|
|
{value: 'TLS', text: Utils.localizeMessage('admin.connectionSecurityTls', 'TLS (Recommended)')},
|
|
{value: 'STARTTLS', text: Utils.localizeMessage('admin.connectionSecurityStart')}
|
|
]}
|
|
label={
|
|
<FormattedMessage
|
|
id='admin.connectionSecurityTitle'
|
|
defaultMessage='Connection Security:'
|
|
/>
|
|
}
|
|
value={this.props.value}
|
|
onChange={this.props.onChange}
|
|
disabled={this.props.disabled}
|
|
helpText={CONNECTION_SECURITY_HELP_TEXT}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
ConnectionSecurityDropdownSetting.defaultProps = {
|
|
};
|
|
|
|
ConnectionSecurityDropdownSetting.propTypes = {
|
|
value: React.PropTypes.string.isRequired,
|
|
onChange: React.PropTypes.func.isRequired,
|
|
disabled: React.PropTypes.bool.isRequired
|
|
};
|