summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console/log_settings.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/admin_console/log_settings.jsx')
-rw-r--r--webapp/components/admin_console/log_settings.jsx22
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>