Skip to content

Commit

Permalink
Merge branch 'devel' into CB-4528-add-sso-auth-support-to-snowflake
Browse files Browse the repository at this point in the history
  • Loading branch information
dariamarutkina authored Mar 15, 2024
2 parents 742caa6 + 25b895c commit f9d1aa0
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { schemaValidationError } from '@cloudbeaver/core-utils';
import { CONNECTION_INFO_PARAM_SCHEMA, type IConnectionInfoParams } from './CONNECTION_INFO_PARAM_SCHEMA';
import { ConnectionInfoEventHandler, IConnectionInfoEvent } from './ConnectionInfoEventHandler';
import type { DatabaseConnection } from './DatabaseConnection';
import { DBDriverResource } from './DBDriverResource';

export type Connection = DatabaseConnection & {
authProperties?: UserConnectionAuthPropertiesFragment[];
Expand Down Expand Up @@ -89,6 +90,7 @@ export class ConnectionInfoResource extends CachedMapResource<IConnectionInfoPar
private readonly projectsService: ProjectsService,
private readonly projectInfoResource: ProjectInfoResource,
private readonly dataSynchronizationService: DataSynchronizationService,
dbDriverResource: DBDriverResource,
sessionDataResource: SessionDataResource,
appAuthService: AppAuthService,
connectionInfoEventHandler: ConnectionInfoEventHandler,
Expand All @@ -114,6 +116,11 @@ export class ConnectionInfoResource extends CachedMapResource<IConnectionInfoPar
this.onItemDelete.addHandler(ExecutorInterrupter.interrupter(() => this.sessionUpdate));
this.onConnectionCreate.addHandler(ExecutorInterrupter.interrupter(() => this.sessionUpdate));

dbDriverResource.onItemDelete.addHandler(data => {
const hiddenConnections = this.values.filter(connection => connection.driverId === data);
this.delete(resourceKeyList(hiddenConnections.map(connection => createConnectionParam(connection))));
});

userInfoResource.onUserChange.addHandler(() => {
this.clear();
});
Expand Down

0 comments on commit f9d1aa0

Please sign in to comment.