mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Fixing connection without saved password not connecting in Async Server Tree (#22535)
This commit is contained in:
@@ -472,6 +472,11 @@ export class ServerTreeView extends Disposable implements IServerTreeView {
|
||||
await this._connectionManagementService.deleteConnection(profile);
|
||||
}
|
||||
const connectionProfile = this.getConnectionInTreeInput(profile.id);
|
||||
|
||||
// For the connection profile, we need to clear the password from the last session if the user doesn't want to save it
|
||||
if (!connectionProfile.savePassword) {
|
||||
connectionProfile.password = '';
|
||||
}
|
||||
// Delete the node from the tree
|
||||
await this._objectExplorerService.deleteObjectExplorerNode(connectionProfile);
|
||||
// Collapse the node
|
||||
|
||||
@@ -270,6 +270,9 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
showFirewallRuleOnError: true
|
||||
};
|
||||
|
||||
if (params && options.params === undefined) {
|
||||
options.params = params;
|
||||
}
|
||||
try {
|
||||
const connectionResult = await this._connectionManagementService.connectAndSaveProfile(connection, uri, options, params && params.input);
|
||||
this._connecting = false;
|
||||
|
||||
@@ -416,7 +416,9 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
connectionType: this._connectionStatusManager.isEditorTypeUri(owner.uri) ? ConnectionType.editor : ConnectionType.default,
|
||||
input: owner,
|
||||
runQueryOnCompletion: RunQueryOnConnectionMode.none,
|
||||
showDashboard: options.showDashboard
|
||||
showDashboard: options.showDashboard,
|
||||
isEditConnection: true,
|
||||
oldProfileId: connection.id
|
||||
};
|
||||
return this.showConnectionDialog(params, options, connection, connectionResult).then(() => {
|
||||
return connectionResult;
|
||||
|
||||
@@ -305,8 +305,8 @@ export class TreeUpdateUtils {
|
||||
|
||||
// If the node update takes too long, reject the promise
|
||||
const nodeUpdateTimeout = () => {
|
||||
reject(new Error(nls.localize('objectExplorerTimeout', "Object Explorer expansion timed out for '{0}'", connection.databaseName)));
|
||||
cleanup();
|
||||
reject(new Error(nls.localize('objectExplorerTimeout', "Object Explorer expansion timed out for '{0}'", connection.databaseName)));
|
||||
}
|
||||
const nodeUpdateTimer = setTimeout(nodeUpdateTimeout, expansionTimeoutValueSec * 1000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user