mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 02:32:35 -05:00
optional database name option (#17538)
* optional database name option * object explorer connection title * revert unexpected change * bug fixes
This commit is contained in:
@@ -160,9 +160,13 @@ export class ProviderConnectionInfo extends Disposable implements azdata.Connect
|
||||
}
|
||||
|
||||
private getServerInfo() {
|
||||
let databaseName = this.databaseName ? this.databaseName : '<default>';
|
||||
let userName = this.userName ? this.userName : 'Windows Authentication';
|
||||
return this.serverName + ', ' + databaseName + ' (' + userName + ')';
|
||||
let title = this.serverName;
|
||||
// Only show database name if the provider supports it.
|
||||
if (this.serverCapabilities?.connectionOptions?.find(option => option.specialValueType === ConnectionOptionSpecialType.databaseName)) {
|
||||
title += `, ${this.databaseName || '<default>'}`;
|
||||
}
|
||||
title += ` (${this.userName || this.authenticationType})`;
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user