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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b1520d0b94
Коммит
b114062c1b
@@ -17,13 +17,6 @@ export default class SessionSettings extends AdminSettings {
|
||||
this.getConfigFromState = this.getConfigFromState.bind(this);
|
||||
|
||||
this.renderSettings = this.renderSettings.bind(this);
|
||||
|
||||
this.state = Object.assign(this.state, {
|
||||
sessionLengthWebInDays: props.config.ServiceSettings.SessionLengthWebInDays,
|
||||
sessionLengthMobileInDays: props.config.ServiceSettings.SessionLengthMobileInDays,
|
||||
sessionLengthSSOInDays: props.config.ServiceSettings.SessionLengthSSOInDays,
|
||||
sessionCacheInMinutes: props.config.ServiceSettings.SessionCacheInMinutes
|
||||
});
|
||||
}
|
||||
|
||||
getConfigFromState(config) {
|
||||
@@ -35,6 +28,15 @@ export default class SessionSettings extends AdminSettings {
|
||||
return config;
|
||||
}
|
||||
|
||||
getStateFromConfig(config) {
|
||||
return {
|
||||
sessionLengthWebInDays: config.ServiceSettings.SessionLengthWebInDays,
|
||||
sessionLengthMobileInDays: config.ServiceSettings.SessionLengthMobileInDays,
|
||||
sessionLengthSSOInDays: config.ServiceSettings.SessionLengthSSOInDays,
|
||||
sessionCacheInMinutes: config.ServiceSettings.SessionCacheInMinutes
|
||||
};
|
||||
}
|
||||
|
||||
renderTitle() {
|
||||
return (
|
||||
<h3>
|
||||
|
||||
Ссылка в новой задаче
Block a user