optional database name option (#17538)

* optional database name option

* object explorer connection title

* revert unexpected change

* bug fixes
This commit is contained in:
Alan Ren
2021-10-29 16:37:35 -07:00
committed by GitHub
parent ce8f1156b1
commit b48f392ab2
5 changed files with 45 additions and 77 deletions

View File

@@ -229,11 +229,11 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
title = this._description + ' ';
}
if (profile) {
if (profile.userName) {
title += `${profile.serverName}.${profile.databaseName} (${profile.userName})`;
} else {
title += `${profile.serverName}.${profile.databaseName} (${profile.authenticationType})`;
title += `${profile.serverName}`;
if (profile.databaseName) {
title += `.${profile.databaseName}`;
}
title += ` (${profile.userName || profile.authenticationType})`;
} else {
title += localize('disconnected', "disconnected");
}