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
Этот коммит содержится в:
Harrison Healey
2016-07-06 16:07:56 -04:00
коммит произвёл GitHub
родитель b1520d0b94
Коммит b114062c1b
30 изменённых файлов: 327 добавлений и 256 удалений

Просмотреть файл

@@ -18,11 +18,6 @@ export default class ConnectionSettings extends AdminSettings {
this.getConfigFromState = this.getConfigFromState.bind(this);
this.renderSettings = this.renderSettings.bind(this);
this.state = Object.assign(this.state, {
allowCorsFrom: props.config.ServiceSettings.AllowCorsFrom,
enableInsecureOutgoingConnections: props.config.ServiceSettings.EnableInsecureOutgoingConnections
});
}
getConfigFromState(config) {
@@ -32,6 +27,13 @@ export default class ConnectionSettings extends AdminSettings {
return config;
}
getStateFromConfig(config) {
return {
allowCorsFrom: config.ServiceSettings.AllowCorsFrom,
enableInsecureOutgoingConnections: config.ServiceSettings.EnableInsecureOutgoingConnections
};
}
renderTitle() {
return (
<h3>