Fix servername in breadcrumb service and dashboard tab (#24150)

This commit is contained in:
Alex Ma
2023-08-16 21:23:14 -07:00
committed by GitHub
parent b38b5964d8
commit f4a459f508
2 changed files with 3 additions and 3 deletions

View File

@@ -85,9 +85,9 @@ export class DashboardInput extends EditorInput {
}
let name = this.connectionProfile.connectionName ? this.connectionProfile.connectionName : this.connectionProfile.serverName
if (this.connectionProfile.databaseName
if (!this.connectionProfile.connectionName && this.connectionProfile.databaseName
&& !this.isMasterMssql()) {
// Only add DB name if this is a non-default, non-master connection
// Only add DB name if this is a non-default, non-master connection and if there is no user set profile name.
name = name + ':' + this.connectionProfile.databaseName;
}
return name;

View File

@@ -57,7 +57,7 @@ export class BreadcrumbService implements IBreadcrumbService {
}
private getServerBreadcrumb(profile: ConnectionProfile): MenuItem {
return profile.connectionName ? { label: profile.connectionName, routerLink: ['server-dashboard'] } : { label: profile.serverName, routerLink: ['server-dashboard'] };
return { label: profile.serverName, routerLink: ['server-dashboard'] };
}
private getDbBreadcrumb(profile: ConnectionProfile): MenuItem {