Changed connection title generation to use getConnections (including recent and saved). (#22954)

* remove advanced options for table designer and notebook Actions title (unnecessary in usage context)

* Revert "remove advanced options for table designer and notebook Actions title (unnecessary in usage context)"

This reverts commit e30aee5151319863aebbb4738fb30354c179c2c5.

* added changes based on feedback

* added null check and updated tests

* WIP change to connection title generation

* WIP connection management service update

* fix to connectionManagementService test

* fix editorConnectionTitles

* renamed nondefault to distinguishing options

* use stored connections for options

* removed erroneous connection name set to null

* added title by ID search for title generation

* Add recent connection title

* added fix for stub bug

* added child title options appended

* WIP rework of getEditorTitle

* more work done

* WIP changes for 5-2-2023

* moved server info to generate titles.

* added reworked title generation

* added working active connection title generation and cleanup

* added comments to argument

* remove unnecessary spaces

* added id fix assign

* added fromEditor save

* Revert "Revert new connection string format (#22997)"

This reverts commit 898bb73a34.

* added small fix to tests and exclude empty properties

* made small fixes for tests

* update expected ID

* added support for old password key and removed empty options

* added in authenticationType core property

* fix for whitespace indentation

* added connection save profile to thing

* made some small fixes to connection options

* added small change to connectionDialogService

* added nullcheck for saveProfile

* added negation for connection saveProfile

* remove duplicate editor title generation

* added edit profile handling for titles

* Cleanup serverCapabilities property

* fixed dependency issues

* removed connectionproviderproperties

* added fix for treeupdateutils

* made update to title generation

* added recent connections change

* Revert "Cleanup serverCapabilities property"

This reverts commit 2c7b94f98cabddb34116dcdd83177614a484c026.

* added dashboard text and fix for connection store test

* added group name to end also temporary added dashboard changes based on feedback

* added in new SQL version

* added fix to edit connections

* added clarifying information to title generation

---------

Co-authored-by: Cheena Malhotra <cmalhotra@microsoft.com>
This commit is contained in:
Alex Ma
2023-06-21 09:59:58 -07:00
committed by GitHub
parent 996d45bfa7
commit ef8164e5c2
32 changed files with 1705 additions and 68 deletions

View File

@@ -26,11 +26,18 @@ export function registerTableDesignerCommands(appContext: AppContext) {
if (!connectionString) {
throw new Error(FailedToGetConnectionStringError);
}
let titleString = `${context.connectionProfile!.serverName} - ${context.connectionProfile!.databaseName} - ${NewTableText}`;
// append distinguishing options to end to let users know exact connection.
let distinguishingOptions = await azdata.connection.getEditorConnectionProfileTitle(context.connectionProfile, true);
if (distinguishingOptions !== '') {
distinguishingOptions = distinguishingOptions.replace('(', '[').replace(')', ']');
titleString += `${distinguishingOptions}`;
}
const tableIcon = context.nodeInfo!.nodeSubType as azdata.designers.TableIcon;
const telemetryInfo = await getTelemetryInfo(context, tableIcon);
await azdata.designers.openTableDesigner(sqlProviderName, {
title: NewTableText,
tooltip: `${context.connectionProfile!.serverName} - ${context.connectionProfile!.databaseName} - ${NewTableText}`,
tooltip: titleString,
server: context.connectionProfile!.serverName,
database: context.connectionProfile!.databaseName,
isNewTable: true,
@@ -56,11 +63,18 @@ export function registerTableDesignerCommands(appContext: AppContext) {
if (!connectionString) {
throw new Error(FailedToGetConnectionStringError);
}
let titleString = `${server} - ${database} - ${schema}.${name}`;
// append distinguishing options to end to let users know exact connection.
let distinguishingOptions = await azdata.connection.getEditorConnectionProfileTitle(context.connectionProfile, true);
if (distinguishingOptions !== '') {
distinguishingOptions = distinguishingOptions.replace('(', '[').replace(')', ']');
titleString += `${distinguishingOptions}`;
}
const tableIcon = context.nodeInfo!.nodeSubType as azdata.designers.TableIcon;
const telemetryInfo = await getTelemetryInfo(context, tableIcon);
await azdata.designers.openTableDesigner(sqlProviderName, {
title: `${schema}.${name}`,
tooltip: `${server} - ${database} - ${schema}.${name}`,
tooltip: titleString,
server: server,
database: database,
isNewTable: false,