PLT-5900 Removed automatic configuration of SiteURL (#5952)
* Revert "PLT-5765 Passed SiteURL to SendNotifications (#5705)"
This reverts commit a8e68bd890.
* Removed automatic configuration of SiteURL
* Reverted unintentional config changes
* Updated help text
* Added link to docs in Site URL warning
* Fixed merge conflict
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
3a79e451ff
Коммит
c7bdce8a66
@@ -69,6 +69,10 @@ export default class AdminSettings extends React.Component {
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
|
||||
if (this.handleSaved) {
|
||||
this.handleSaved(config);
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
this.setState({
|
||||
@@ -79,6 +83,10 @@ export default class AdminSettings extends React.Component {
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
|
||||
if (this.handleSaved) {
|
||||
this.handleSaved(config);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,18 +2,20 @@
|
||||
// See License.txt for license information.
|
||||
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
import ErrorStore from 'stores/error_store.jsx';
|
||||
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import AdminSettings from './admin_settings.jsx';
|
||||
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
||||
import BooleanSetting from './boolean_setting.jsx';
|
||||
import {ConnectionSecurityDropdownSettingWebserver} from './connection_security_dropdown_setting.jsx';
|
||||
import PurgeCachesButton from './purge_caches.jsx';
|
||||
import ReloadConfigButton from './reload_config.jsx';
|
||||
import SettingsGroup from './settings_group.jsx';
|
||||
import TextSetting from './text_setting.jsx';
|
||||
import ReloadConfigButton from './reload_config.jsx';
|
||||
import PurgeCachesButton from './purge_caches.jsx';
|
||||
import WebserverModeDropdownSetting from './webserver_mode_dropdown_setting.jsx';
|
||||
import {ConnectionSecurityDropdownSettingWebserver} from './connection_security_dropdown_setting.jsx';
|
||||
import BooleanSetting from './boolean_setting.jsx';
|
||||
|
||||
export default class ConfigurationSettings extends AdminSettings {
|
||||
constructor(props) {
|
||||
@@ -21,6 +23,8 @@ export default class ConfigurationSettings extends AdminSettings {
|
||||
|
||||
this.getConfigFromState = this.getConfigFromState.bind(this);
|
||||
|
||||
this.handleSaved = this.handleSaved.bind(this);
|
||||
|
||||
this.renderSettings = this.renderSettings.bind(this);
|
||||
}
|
||||
|
||||
@@ -62,6 +66,14 @@ export default class ConfigurationSettings extends AdminSettings {
|
||||
};
|
||||
}
|
||||
|
||||
handleSaved(newConfig) {
|
||||
const lastError = ErrorStore.getLastError();
|
||||
|
||||
if (lastError && lastError.message === 'error_bar.site_url' && newConfig.ServiceSettings.SiteURL) {
|
||||
ErrorStore.clearLastError(true);
|
||||
}
|
||||
}
|
||||
|
||||
renderTitle() {
|
||||
return (
|
||||
<FormattedMessage
|
||||
@@ -92,9 +104,9 @@ export default class ConfigurationSettings extends AdminSettings {
|
||||
}
|
||||
placeholder={Utils.localizeMessage('admin.service.siteURLExample', 'Ex "https://mattermost.example.com:1234"')}
|
||||
helpText={
|
||||
<FormattedHTMLMessage
|
||||
<FormattedMessage
|
||||
id='admin.service.siteURLDescription'
|
||||
defaultMessage='The URL, including port number and protocol, that users will use to access Mattermost. This field can be left blank unless you are configuring email batching in <b>Notifications > Email</b>. When blank, the URL is automatically configured based on incoming traffic.'
|
||||
defaultMessage='The URL, including port number and protocol, that users will use to access Mattermost. This setting is required.'
|
||||
/>
|
||||
}
|
||||
value={this.state.siteURL}
|
||||
|
||||
Ссылка в новой задаче
Block a user