From 86d0779c87237ad0f43ce5c355446ae728207b88 Mon Sep 17 00:00:00 2001 From: Christopher Suh Date: Fri, 29 Sep 2023 14:40:47 -0700 Subject: [PATCH] fix dashboard opening server vs database view (#24546) --- .../connection/browser/connectionManagementService.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sql/workbench/services/connection/browser/connectionManagementService.ts b/src/sql/workbench/services/connection/browser/connectionManagementService.ts index 0b3a02ccd4..bb35ddec01 100644 --- a/src/sql/workbench/services/connection/browser/connectionManagementService.ts +++ b/src/sql/workbench/services/connection/browser/connectionManagementService.ts @@ -480,6 +480,10 @@ export class ConnectionManagementService extends Disposable implements IConnecti profile.userName = accounts?.find(a => a.key.accountId === profile.azureAccount)?.displayInfo.displayName ?? profile.userName; } + // This is used to specify whether a connection is server level or database level + if (profile.databaseName !== 'master' || !profile.databaseName) { + profile.options.originalDatabase = profile.databaseName + } } return profile; }