diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-08-09 09:53:22 -0400 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2016-08-09 08:53:22 -0500 |
commit | 0afa28de0953ed528486a7d7ad6000f344624710 (patch) | |
tree | a31d1668aab355784547d1bc93ab3d8801ed2dd7 /webapp/components/admin_console | |
parent | 09d98b486e8245ae84a452331e36e2978a6d01ab (diff) | |
download | chat-0afa28de0953ed528486a7d7ad6000f344624710.tar.gz chat-0afa28de0953ed528486a7d7ad6000f344624710.tar.bz2 chat-0afa28de0953ed528486a7d7ad6000f344624710.zip |
Changed autodetection of SiteURL (#3764)
* Changed autoconfiguration of SiteURL to be done on every request
* Added SiteURL to system console
Diffstat (limited to 'webapp/components/admin_console')
-rw-r--r-- | webapp/components/admin_console/configuration_settings.jsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/webapp/components/admin_console/configuration_settings.jsx b/webapp/components/admin_console/configuration_settings.jsx index e34167a30..6a07e31cd 100644 --- a/webapp/components/admin_console/configuration_settings.jsx +++ b/webapp/components/admin_console/configuration_settings.jsx @@ -28,6 +28,7 @@ export default class ConfigurationSettings extends AdminSettings { } getConfigFromState(config) { + config.ServiceSettings.SiteURL = this.state.siteURL; config.ServiceSettings.ListenAddress = this.state.listenAddress; config.ServiceSettings.WebserverMode = this.state.webserverMode; @@ -36,6 +37,7 @@ export default class ConfigurationSettings extends AdminSettings { getStateFromConfig(config) { return { + siteURL: config.ServiceSettings.SiteURL, listenAddress: config.ServiceSettings.ListenAddress, webserverMode: config.ServiceSettings.WebserverMode }; @@ -56,6 +58,24 @@ export default class ConfigurationSettings extends AdminSettings { return ( <SettingsGroup> <TextSetting + id='siteURL' + label={ + <FormattedMessage + id='admin.service.siteURL' + defaultMessage='Site URL:' + /> + } + placeholder={Utils.localizeMessage('admin.service.siteURLExample', 'Ex "https://mattermost.example.com:1234"')} + helpText={ + <FormattedMessage + id='admin.service.siteURLDescription' + defaultMessage='The URL, including port number and protocol, from which users will access Mattermost. Leave blank to automatically configure based on incoming traffic.' + /> + } + value={this.state.siteURL} + onChange={this.handleChange} + /> + <TextSetting id='listenAddress' label={ <FormattedMessage |