mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(plugin-administration): CB-1798 sync settings update
This commit is contained in:
@@ -149,6 +149,12 @@ export class ServerConfigResource extends CachedDataResource<ServerConfig | null
|
||||
this.navigatorSettingsUpdate = update;
|
||||
}
|
||||
|
||||
resetUpdate(): void {
|
||||
if (this.data) {
|
||||
this.syncUpdateData(this.data);
|
||||
}
|
||||
}
|
||||
|
||||
unlinkUpdate(): void {
|
||||
this.update = {};
|
||||
|
||||
|
||||
+6
@@ -78,6 +78,7 @@ export class ServerConfigurationService {
|
||||
|
||||
this.loadConfigTask
|
||||
.next(this.validationTask, () => this.getSaveData(false))
|
||||
.addHandler(ExecutorInterrupter.interrupter(() => this.loading))
|
||||
.addHandler(() => { this.loading = true; })
|
||||
.addHandler(this.loadServerConfig)
|
||||
.addPostHandler(() => {
|
||||
@@ -134,6 +135,10 @@ export class ServerConfigurationService {
|
||||
this.serverConfigResource.setDataUpdate(this.state.serverConfig);
|
||||
this.serverConfigResource.setNavigatorSettingsUpdate(this.state.navigatorConfig);
|
||||
|
||||
if (reset) {
|
||||
this.serverConfigResource.resetUpdate();
|
||||
}
|
||||
|
||||
this.stateLinked = true;
|
||||
}
|
||||
|
||||
@@ -263,6 +268,7 @@ export class ServerConfigurationService {
|
||||
|
||||
if (
|
||||
close
|
||||
|| !this.stateLinked
|
||||
|| this.unSaveNotification
|
||||
|| this.administrationScreenService.isConfigurationMode
|
||||
// || !this.administrationScreenService.isAdministrationPageActive
|
||||
|
||||
+1
-1
@@ -37,7 +37,6 @@ export class ServerConfigurationAuthenticationBootstrap extends Bootstrap {
|
||||
}
|
||||
|
||||
try {
|
||||
await this.authProvidersResource.loadAll();
|
||||
const config = await this.serverConfigResource.load();
|
||||
|
||||
if (!config) {
|
||||
@@ -45,6 +44,7 @@ export class ServerConfigurationAuthenticationBootstrap extends Bootstrap {
|
||||
}
|
||||
|
||||
if (config.configurationMode) {
|
||||
await this.authProvidersResource.loadAll();
|
||||
if (this.authProvidersResource.has(AUTH_PROVIDER_LOCAL_ID)) {
|
||||
data.state.serverConfig.adminName = 'cbadmin';
|
||||
data.state.serverConfig.adminPassword = '';
|
||||
|
||||
Reference in New Issue
Block a user