Revert new connection string format (#22997)

This commit is contained in:
Alex Ma
2023-05-05 13:41:40 -07:00
committed by GitHub
parent 27e0d67dec
commit 898bb73a34
34 changed files with 77 additions and 1690 deletions

View File

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