mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -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);
|
await this._connectionManagementService.deleteConnection(profile);
|
||||||
}
|
}
|
||||||
const connectionProfile = this.getConnectionInTreeInput(profile.id);
|
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
|
// Delete the node from the tree
|
||||||
await this._objectExplorerService.deleteObjectExplorerNode(connectionProfile);
|
await this._objectExplorerService.deleteObjectExplorerNode(connectionProfile);
|
||||||
// Collapse the node
|
// Collapse the node
|
||||||
|
|||||||
@@ -270,6 +270,9 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
|||||||
showFirewallRuleOnError: true
|
showFirewallRuleOnError: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (params && options.params === undefined) {
|
||||||
|
options.params = params;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const connectionResult = await this._connectionManagementService.connectAndSaveProfile(connection, uri, options, params && params.input);
|
const connectionResult = await this._connectionManagementService.connectAndSaveProfile(connection, uri, options, params && params.input);
|
||||||
this._connecting = false;
|
this._connecting = false;
|
||||||
|
|||||||
@@ -416,7 +416,9 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
connectionType: this._connectionStatusManager.isEditorTypeUri(owner.uri) ? ConnectionType.editor : ConnectionType.default,
|
connectionType: this._connectionStatusManager.isEditorTypeUri(owner.uri) ? ConnectionType.editor : ConnectionType.default,
|
||||||
input: owner,
|
input: owner,
|
||||||
runQueryOnCompletion: RunQueryOnConnectionMode.none,
|
runQueryOnCompletion: RunQueryOnConnectionMode.none,
|
||||||
showDashboard: options.showDashboard
|
showDashboard: options.showDashboard,
|
||||||
|
isEditConnection: true,
|
||||||
|
oldProfileId: connection.id
|
||||||
};
|
};
|
||||||
return this.showConnectionDialog(params, options, connection, connectionResult).then(() => {
|
return this.showConnectionDialog(params, options, connection, connectionResult).then(() => {
|
||||||
return connectionResult;
|
return connectionResult;
|
||||||
|
|||||||
@@ -305,8 +305,8 @@ export class TreeUpdateUtils {
|
|||||||
|
|
||||||
// If the node update takes too long, reject the promise
|
// If the node update takes too long, reject the promise
|
||||||
const nodeUpdateTimeout = () => {
|
const nodeUpdateTimeout = () => {
|
||||||
reject(new Error(nls.localize('objectExplorerTimeout', "Object Explorer expansion timed out for '{0}'", connection.databaseName)));
|
|
||||||
cleanup();
|
cleanup();
|
||||||
|
reject(new Error(nls.localize('objectExplorerTimeout', "Object Explorer expansion timed out for '{0}'", connection.databaseName)));
|
||||||
}
|
}
|
||||||
const nodeUpdateTimer = setTimeout(nodeUpdateTimeout, expansionTimeoutValueSec * 1000);
|
const nodeUpdateTimer = setTimeout(nodeUpdateTimeout, expansionTimeoutValueSec * 1000);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user