mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(core): temporary connection disconnect behavior
CB-121
This commit is contained in:
+1
-1
@@ -180,7 +180,7 @@ export class ConnectionSchemaManagerService {
|
||||
try {
|
||||
await this.connectionsManagerService.loadConnectionInfoAsync(connectionId);
|
||||
} catch (exception) {
|
||||
this.notificationService.logException(exception, 'Can\'t load connection info');
|
||||
this.notificationService.logException(exception, 'Can\'t load connection info', true);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ export class ConnectionSelectorController {
|
||||
}
|
||||
|
||||
get isConnectionSelectorVisible() {
|
||||
return !!this.connectionSelectorService.currentConnectionId;
|
||||
return !!this.currentConnection;
|
||||
}
|
||||
get isObjectContainerSelectorVisible() {
|
||||
return !!this.connectionSelectorService.currentObjectCatalogId
|
||||
|
||||
+10
-5
@@ -173,22 +173,27 @@ export class ConnectionsManagerService {
|
||||
}
|
||||
|
||||
async closeNavNodeConnectionAsync(navNodeId: string): Promise<void> {
|
||||
const node = this.navNodeManagerService.getNode(navNodeId);
|
||||
if (!node) {
|
||||
const connectionId = NodeManagerUtils.connectionNodeIdToConnectionId(navNodeId);
|
||||
const connection = this.getConnectionById(connectionId);
|
||||
if (!connection) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const connectionId = NodeManagerUtils.connectionNodeIdToConnectionId(navNodeId);
|
||||
await this.graphQLService.gql.closeConnection({ id: connectionId });
|
||||
await this.afterConnectionClose(connectionId);
|
||||
await this.connectionInfo.refresh(true, { connectionId, close: true });
|
||||
|
||||
if (node.objectFeatures.includes('dataSourceTemporary')) {
|
||||
if (connection.features.includes(EConnectionFeature.temporary)) {
|
||||
const node = this.navNodeManagerService.getNode(navNodeId);
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
await this.navNodeManagerService.refreshTree(node.parentId);
|
||||
} else {
|
||||
await this.navNodeManagerService.refreshNode(navNodeId);
|
||||
await this.navNodeManagerService.removeTree(navNodeId);
|
||||
}
|
||||
await this.navNodeManagerService.removeTree(navNodeId);
|
||||
} catch (exception) {
|
||||
this.notificationService.logException(exception, `Can't close connection: ${navNodeId}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user