diff --git a/webapp/packages/plugin-connections/src/ConnectionAuthService.ts b/webapp/packages/plugin-connections/src/ConnectionAuthService.ts index 79e610752d..4c648a371f 100644 --- a/webapp/packages/plugin-connections/src/ConnectionAuthService.ts +++ b/webapp/packages/plugin-connections/src/ConnectionAuthService.ts @@ -5,6 +5,8 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ +import React from 'react'; + import { AuthProviderService } from '@cloudbeaver/core-authentication'; import { Connection, @@ -15,11 +17,13 @@ import { } from '@cloudbeaver/core-connections'; import { Dependency, injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; -import { NotificationService } from '@cloudbeaver/core-events'; import type { IExecutionContextProvider } from '@cloudbeaver/core-executor'; import { AuthenticationService } from '@cloudbeaver/plugin-authentication'; -import { DatabaseAuthDialog } from './DatabaseAuthDialog/DatabaseAuthDialog'; +const DatabaseAuthDialog = React.lazy(async () => { + const { DatabaseAuthDialog } = await import('./DatabaseAuthDialog/DatabaseAuthDialog'); + return { default: DatabaseAuthDialog }; +}); @injectable() export class ConnectionAuthService extends Dependency { @@ -28,7 +32,6 @@ export class ConnectionAuthService extends Dependency { private readonly commonDialogService: CommonDialogService, private readonly authProviderService: AuthProviderService, private readonly connectionsManagerService: ConnectionsManagerService, - private readonly notificationService: NotificationService, private readonly authenticationService: AuthenticationService, ) { super(); @@ -77,7 +80,14 @@ export class ConnectionAuthService extends Dependency { } } - connection = await this.connectionInfoResource.load(key, ['includeAuthNeeded', 'includeNetworkHandlersConfig', 'includeCredentialsSaved']); + connection = await this.connectionInfoResource.load(key, [ + 'includeAuthNeeded', + 'includeNetworkHandlersConfig', + 'includeCredentialsSaved', + 'customIncludeOptions', + 'includeAuthProperties', + 'includeProviderProperties', + ]); const networkHandlers = connection .networkHandlersConfig!.filter(handler => handler.enabled && (!handler.savePassword || resetCredentials))