From f4a459f5085cb9675a8ef1d611d17bb5d84bb792 Mon Sep 17 00:00:00 2001 From: Alex Ma Date: Wed, 16 Aug 2023 21:23:14 -0700 Subject: [PATCH] Fix servername in breadcrumb service and dashboard tab (#24150) --- src/sql/workbench/browser/editor/profiler/dashboardInput.ts | 4 ++-- .../contrib/dashboard/browser/services/breadcrumb.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/workbench/browser/editor/profiler/dashboardInput.ts b/src/sql/workbench/browser/editor/profiler/dashboardInput.ts index 89cccbe619..06a001c46f 100644 --- a/src/sql/workbench/browser/editor/profiler/dashboardInput.ts +++ b/src/sql/workbench/browser/editor/profiler/dashboardInput.ts @@ -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; diff --git a/src/sql/workbench/contrib/dashboard/browser/services/breadcrumb.service.ts b/src/sql/workbench/contrib/dashboard/browser/services/breadcrumb.service.ts index a3335967dc..1e8c3f8afd 100644 --- a/src/sql/workbench/contrib/dashboard/browser/services/breadcrumb.service.ts +++ b/src/sql/workbench/contrib/dashboard/browser/services/breadcrumb.service.ts @@ -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 {