diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-07-06 16:07:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-06 16:07:56 -0400 |
commit | b114062c1b8128fe650fce72454ba4f1fcbe5733 (patch) | |
tree | 0a51e9d1342bf89c435662c618d9aac5ba651b4b /webapp/components/admin_console/log_settings.jsx | |
parent | b1520d0b9458d1dab09d9e3e05dd7522fc28ba57 (diff) | |
download | chat-b114062c1b8128fe650fce72454ba4f1fcbe5733.tar.gz chat-b114062c1b8128fe650fce72454ba4f1fcbe5733.tar.bz2 chat-b114062c1b8128fe650fce72454ba4f1fcbe5733.zip |
PLT-3237 Update displayed config values in admin console after saving (#3506)
* Reloaded admin console data when settings are saved
* Fixed attempting to save an invalid config setting overwriting the stored config
Diffstat (limited to 'webapp/components/admin_console/log_settings.jsx')
-rw-r--r-- | webapp/components/admin_console/log_settings.jsx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/webapp/components/admin_console/log_settings.jsx b/webapp/components/admin_console/log_settings.jsx index 57b2a6353..efd1bf342 100644 --- a/webapp/components/admin_console/log_settings.jsx +++ b/webapp/components/admin_console/log_settings.jsx @@ -19,16 +19,6 @@ export default class LogSettings extends AdminSettings { this.getConfigFromState = this.getConfigFromState.bind(this); this.renderSettings = this.renderSettings.bind(this); - - this.state = Object.assign(this.state, { - enableConsole: props.config.LogSettings.EnableConsole, - consoleLevel: props.config.LogSettings.ConsoleLevel, - enableFile: props.config.LogSettings.EnableFile, - fileLevel: props.config.LogSettings.FileLevel, - fileLocation: props.config.LogSettings.FileLocation, - fileFormat: props.config.LogSettings.FileFormat, - enableWebhookDebugging: props.config.LogSettings.EnableWebhookDebugging - }); } getConfigFromState(config) { @@ -43,6 +33,18 @@ export default class LogSettings extends AdminSettings { return config; } + getStateFromConfig(config) { + return { + enableConsole: config.LogSettings.EnableConsole, + consoleLevel: config.LogSettings.ConsoleLevel, + enableFile: config.LogSettings.EnableFile, + fileLevel: config.LogSettings.FileLevel, + fileLocation: config.LogSettings.FileLocation, + fileFormat: config.LogSettings.FileFormat, + enableWebhookDebugging: config.LogSettings.EnableWebhookDebugging + }; + } + renderTitle() { return ( <h3> |