From da0747ac7a3c8d3ef8eb2620f52fe5d1fd355a12 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Wed, 6 Jul 2016 12:04:22 -0400
Subject: Adding webserver mode to the system console. Automatic enabling of
 gzip on existing servers (#3458)

---
 webapp/components/admin_console/configuration_settings.jsx | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

(limited to 'webapp/components/admin_console/configuration_settings.jsx')

diff --git a/webapp/components/admin_console/configuration_settings.jsx b/webapp/components/admin_console/configuration_settings.jsx
index 65cec3027..4f88a1954 100644
--- a/webapp/components/admin_console/configuration_settings.jsx
+++ b/webapp/components/admin_console/configuration_settings.jsx
@@ -10,6 +10,7 @@ import {FormattedMessage} from 'react-intl';
 import SettingsGroup from './settings_group.jsx';
 import TextSetting from './text_setting.jsx';
 import ReloadConfigButton from './reload_config.jsx';
+import WebserverModeDropdownSetting from './webserver_mode_dropdown_setting.jsx';
 
 export default class ConfigurationSettings extends AdminSettings {
     constructor(props) {
@@ -20,7 +21,8 @@ export default class ConfigurationSettings extends AdminSettings {
         this.renderSettings = this.renderSettings.bind(this);
 
         this.state = Object.assign(this.state, {
-            listenAddress: props.config.ServiceSettings.ListenAddress
+            listenAddress: props.config.ServiceSettings.ListenAddress,
+            webserverMode: props.config.ServiceSettings.WebserverMode
         });
     }
 
@@ -32,6 +34,7 @@ export default class ConfigurationSettings extends AdminSettings {
 
     getConfigFromState(config) {
         config.ServiceSettings.ListenAddress = this.state.listenAddress;
+        config.ServiceSettings.WebserverMode = this.state.webserverMode;
 
         return config;
     }
@@ -68,8 +71,13 @@ export default class ConfigurationSettings extends AdminSettings {
                     value={this.state.listenAddress}
                     onChange={this.handleChange}
                 />
+                <WebserverModeDropdownSetting
+                    value={this.state.webserverMode}
+                    onChange={this.handleChange}
+                    disabled={false}
+                />
                 <ReloadConfigButton/>
             </SettingsGroup>
         );
     }
-}
\ No newline at end of file
+}
-- 
cgit v1.2.3-1-g7c22

