From 949dddfe8c22e9c5e15be819d9559728fe2a5b92 Mon Sep 17 00:00:00 2001 From: Sakshi Sharma <57200045+SakshiS-harma@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:58:26 -0700 Subject: [PATCH 1/7] Update profiler version and related azdata dependency (#23739) --- extensions/profiler/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/profiler/package.json b/extensions/profiler/package.json index 9ef53c5ec8ba..2167fa830adc 100644 --- a/extensions/profiler/package.json +++ b/extensions/profiler/package.json @@ -2,13 +2,14 @@ "name": "profiler", "displayName": "%displayName%", "description": "%description%", - "version": "0.13.0", + "version": "0.14.0", "publisher": "Microsoft", "preview": true, "license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt", "icon": "images/extension.png", "engines": { - "vscode": "0.10.0" + "vscode": "0.10.0", + "azdata": ">=1.45.0" }, "activationEvents": [ "*" From 1a52c8b0d8c10948839636ce3bcabd994d88eb73 Mon Sep 17 00:00:00 2001 From: Alex Ma Date: Mon, 10 Jul 2023 16:11:34 -0700 Subject: [PATCH 2/7] [Loc] added translated getting started to langpack (#23744) (#23746) --- i18n/ads-language-pack-de/translations/main.i18n.json | 4 ++-- i18n/ads-language-pack-es/translations/main.i18n.json | 4 ++-- i18n/ads-language-pack-fr/translations/main.i18n.json | 4 ++-- i18n/ads-language-pack-it/translations/main.i18n.json | 4 ++-- i18n/ads-language-pack-ja/translations/main.i18n.json | 4 ++-- i18n/ads-language-pack-ko/translations/main.i18n.json | 4 ++-- i18n/ads-language-pack-pt-BR/translations/main.i18n.json | 4 ++-- i18n/ads-language-pack-ru/translations/main.i18n.json | 4 ++-- i18n/ads-language-pack-zh-hans/translations/main.i18n.json | 4 ++-- i18n/ads-language-pack-zh-hant/translations/main.i18n.json | 4 ++-- resources/xlf/de/sql.de.xlf | 4 ++-- resources/xlf/es/sql.es.xlf | 4 ++-- resources/xlf/fr/sql.fr.xlf | 4 ++-- resources/xlf/it/sql.it.xlf | 4 ++-- resources/xlf/ja/sql.ja.xlf | 4 ++-- resources/xlf/ko/sql.ko.xlf | 4 ++-- resources/xlf/pt-br/sql.pt-BR.xlf | 4 ++-- resources/xlf/ru/sql.ru.xlf | 4 ++-- resources/xlf/zh-hans/sql.zh-Hans.xlf | 4 ++-- resources/xlf/zh-hant/sql.zh-Hant.xlf | 4 ++-- 20 files changed, 40 insertions(+), 40 deletions(-) diff --git a/i18n/ads-language-pack-de/translations/main.i18n.json b/i18n/ads-language-pack-de/translations/main.i18n.json index b181fe31b0d3..39ec87afb47a 100644 --- a/i18n/ads-language-pack-de/translations/main.i18n.json +++ b/i18n/ads-language-pack-de/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "Ja (empfohlen)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "Erste &&Schritte", + "showReleaseNotes": "\"Erste Schritte\" anzeigen" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "Verbindung erstellen", diff --git a/i18n/ads-language-pack-es/translations/main.i18n.json b/i18n/ads-language-pack-es/translations/main.i18n.json index 7b155f406c8a..00f865d1ab49 100644 --- a/i18n/ads-language-pack-es/translations/main.i18n.json +++ b/i18n/ads-language-pack-es/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "Sí (opción recomendada)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "I&&ntroducción", + "showReleaseNotes": "Ver introducción" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "Crear una conexión", diff --git a/i18n/ads-language-pack-fr/translations/main.i18n.json b/i18n/ads-language-pack-fr/translations/main.i18n.json index ce0713441926..10bcc6a2082c 100644 --- a/i18n/ads-language-pack-fr/translations/main.i18n.json +++ b/i18n/ads-language-pack-fr/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "Oui (recommandé)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "Pri&&se en main", + "showReleaseNotes": "Afficher la mise en route" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "Créer une connexion", diff --git a/i18n/ads-language-pack-it/translations/main.i18n.json b/i18n/ads-language-pack-it/translations/main.i18n.json index 20e4a27612e7..0b89c0abb38a 100644 --- a/i18n/ads-language-pack-it/translations/main.i18n.json +++ b/i18n/ads-language-pack-it/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "Sì (scelta consigliata)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "&&Introduzione", + "showReleaseNotes": "Mostra introduzione" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "Crea una connessione", diff --git a/i18n/ads-language-pack-ja/translations/main.i18n.json b/i18n/ads-language-pack-ja/translations/main.i18n.json index 8bb294bf18eb..f75ab41c3507 100644 --- a/i18n/ads-language-pack-ja/translations/main.i18n.json +++ b/i18n/ads-language-pack-ja/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "はい (推奨)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "はじめに(&&S)", + "showReleaseNotes": "「はじめに」を表示する" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "接続の作成", diff --git a/i18n/ads-language-pack-ko/translations/main.i18n.json b/i18n/ads-language-pack-ko/translations/main.i18n.json index e7d60cca13a5..9c3f4342aa17 100644 --- a/i18n/ads-language-pack-ko/translations/main.i18n.json +++ b/i18n/ads-language-pack-ko/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "예(추천)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "시작(&&S)", + "showReleaseNotes": "시작 표시" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "연결 만들기", diff --git a/i18n/ads-language-pack-pt-BR/translations/main.i18n.json b/i18n/ads-language-pack-pt-BR/translations/main.i18n.json index cedf3e8f9f65..8448cf866626 100644 --- a/i18n/ads-language-pack-pt-BR/translations/main.i18n.json +++ b/i18n/ads-language-pack-pt-BR/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "Sim (recomendado)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "I&&ntrodução", + "showReleaseNotes": "Mostrar Introdução" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "Criar uma conexão", diff --git a/i18n/ads-language-pack-ru/translations/main.i18n.json b/i18n/ads-language-pack-ru/translations/main.i18n.json index 12c9d84c827f..1a89b2d59cc4 100644 --- a/i18n/ads-language-pack-ru/translations/main.i18n.json +++ b/i18n/ads-language-pack-ru/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "Да (рекомендуется)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "&&Начало работы", + "showReleaseNotes": "Показать раздел \"Начало работы\"" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "Создать подключение", diff --git a/i18n/ads-language-pack-zh-hans/translations/main.i18n.json b/i18n/ads-language-pack-zh-hans/translations/main.i18n.json index efd5f8f9dc40..7c05bae3962f 100644 --- a/i18n/ads-language-pack-zh-hans/translations/main.i18n.json +++ b/i18n/ads-language-pack-zh-hans/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "是(推荐)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "入门(&&S)", + "showReleaseNotes": "显示入门指南" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "创建连接", diff --git a/i18n/ads-language-pack-zh-hant/translations/main.i18n.json b/i18n/ads-language-pack-zh-hant/translations/main.i18n.json index 4897811c431f..e21f84dcf9e2 100644 --- a/i18n/ads-language-pack-zh-hant/translations/main.i18n.json +++ b/i18n/ads-language-pack-zh-hant/translations/main.i18n.json @@ -14606,8 +14606,8 @@ "enablePreviewFeatures.yes": "是 (建議)" }, "sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted": { - "miGettingStarted": "Getting &&Started", - "showReleaseNotes": "Show Getting Started" + "miGettingStarted": "使用者入門(&&S)", + "showReleaseNotes": "顯示使用者入門" }, "sql/workbench/contrib/welcome/page/browser/az_data_welcome_page": { "welcomePage.createConnection": "建立連線", diff --git a/resources/xlf/de/sql.de.xlf b/resources/xlf/de/sql.de.xlf index eea521ac4998..f36fe5172467 100644 --- a/resources/xlf/de/sql.de.xlf +++ b/resources/xlf/de/sql.de.xlf @@ -7096,11 +7096,11 @@ Fehler: {1} Getting &&Started && denotes a mnemonic - Getting &&Started + Erste &&Schritte Show Getting Started - Show Getting Started + "Erste Schritte" anzeigen diff --git a/resources/xlf/es/sql.es.xlf b/resources/xlf/es/sql.es.xlf index ccf04274f7e9..40061f8b05a6 100644 --- a/resources/xlf/es/sql.es.xlf +++ b/resources/xlf/es/sql.es.xlf @@ -7096,11 +7096,11 @@ Error: {1} Getting &&Started && denotes a mnemonic - Getting &&Started + I&&ntroducción Show Getting Started - Show Getting Started + Ver introducción diff --git a/resources/xlf/fr/sql.fr.xlf b/resources/xlf/fr/sql.fr.xlf index c053e369f9c5..3677816531f6 100644 --- a/resources/xlf/fr/sql.fr.xlf +++ b/resources/xlf/fr/sql.fr.xlf @@ -7096,11 +7096,11 @@ Erreur : {1} Getting &&Started && denotes a mnemonic - Getting &&Started + Pri&&se en main Show Getting Started - Show Getting Started + Afficher la mise en route diff --git a/resources/xlf/it/sql.it.xlf b/resources/xlf/it/sql.it.xlf index 1212b4f08fd9..c23249caab2e 100644 --- a/resources/xlf/it/sql.it.xlf +++ b/resources/xlf/it/sql.it.xlf @@ -7096,11 +7096,11 @@ Errore: {1} Getting &&Started && denotes a mnemonic - Getting &&Started + &&Introduzione Show Getting Started - Show Getting Started + Mostra introduzione diff --git a/resources/xlf/ja/sql.ja.xlf b/resources/xlf/ja/sql.ja.xlf index 717d64f08b13..10962ab1e18a 100644 --- a/resources/xlf/ja/sql.ja.xlf +++ b/resources/xlf/ja/sql.ja.xlf @@ -7096,11 +7096,11 @@ Error: {1} Getting &&Started && denotes a mnemonic - Getting &&Started + はじめに(&&S) Show Getting Started - Show Getting Started + 「はじめに」を表示する diff --git a/resources/xlf/ko/sql.ko.xlf b/resources/xlf/ko/sql.ko.xlf index 81d3f7b20a55..c11fc36b6c26 100644 --- a/resources/xlf/ko/sql.ko.xlf +++ b/resources/xlf/ko/sql.ko.xlf @@ -7096,11 +7096,11 @@ Error: {1} Getting &&Started && denotes a mnemonic - Getting &&Started + 시작(&&S) Show Getting Started - Show Getting Started + 시작 표시 diff --git a/resources/xlf/pt-br/sql.pt-BR.xlf b/resources/xlf/pt-br/sql.pt-BR.xlf index 6cdf6b1187c4..12dcd73f6ff9 100644 --- a/resources/xlf/pt-br/sql.pt-BR.xlf +++ b/resources/xlf/pt-br/sql.pt-BR.xlf @@ -7097,11 +7097,11 @@ Erro: {1} Getting &&Started && denotes a mnemonic - Getting &&Started + I&&ntrodução Show Getting Started - Show Getting Started + Mostrar Introdução diff --git a/resources/xlf/ru/sql.ru.xlf b/resources/xlf/ru/sql.ru.xlf index 02b6c7b35722..97d74a6d4763 100644 --- a/resources/xlf/ru/sql.ru.xlf +++ b/resources/xlf/ru/sql.ru.xlf @@ -7096,11 +7096,11 @@ Error: {1} Getting &&Started && denotes a mnemonic - Getting &&Started + &&Начало работы Show Getting Started - Show Getting Started + Показать раздел "Начало работы" diff --git a/resources/xlf/zh-hans/sql.zh-Hans.xlf b/resources/xlf/zh-hans/sql.zh-Hans.xlf index c1221ff2598e..79550bdf1a96 100644 --- a/resources/xlf/zh-hans/sql.zh-Hans.xlf +++ b/resources/xlf/zh-hans/sql.zh-Hans.xlf @@ -7096,11 +7096,11 @@ Error: {1} Getting &&Started && denotes a mnemonic - Getting &&Started + 入门(&&S) Show Getting Started - Show Getting Started + 显示入门指南 diff --git a/resources/xlf/zh-hant/sql.zh-Hant.xlf b/resources/xlf/zh-hant/sql.zh-Hant.xlf index 1ea7855500dc..ccc571596c52 100644 --- a/resources/xlf/zh-hant/sql.zh-Hant.xlf +++ b/resources/xlf/zh-hant/sql.zh-Hant.xlf @@ -7096,11 +7096,11 @@ Error: {1} Getting &&Started && denotes a mnemonic - Getting &&Started + 使用者入門(&&S) Show Getting Started - Show Getting Started + 顯示使用者入門 From a002a8cdec00729a02b8b7e188a89fc15a8feeef Mon Sep 17 00:00:00 2001 From: Christopher Suh Date: Tue, 11 Jul 2023 11:21:15 -0700 Subject: [PATCH 3/7] fix dropdown behavior (#23708) (#23772) --- src/sql/base/browser/ui/dropdownList/dropdownList.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/base/browser/ui/dropdownList/dropdownList.ts b/src/sql/base/browser/ui/dropdownList/dropdownList.ts index d14b4d18d33a..7cbf58b83991 100644 --- a/src/sql/base/browser/ui/dropdownList/dropdownList.ts +++ b/src/sql/base/browser/ui/dropdownList/dropdownList.ts @@ -79,7 +79,7 @@ export class Dropdown extends BaseDropdown { } } -export class DropdownList extends BaseDropdown { +export class DropdownList extends Dropdown { protected borderWidth = 1; private button?: Button; @@ -145,7 +145,7 @@ export class DropdownList extends BaseDropdown { /** * Render the dropdown contents */ - protected renderContents(container: HTMLElement): IDisposable | null { + protected override renderContents(container: HTMLElement): IDisposable | null { let div = DOM.append(container, this._contentContainer); div.style.width = (DOM.getTotalWidth(this.element) - this.borderWidth * 2) + 'px'; // Subtract border width return { dispose: () => { } }; From 94899e6e36d1d0adacc19ec4731d9224bec793d0 Mon Sep 17 00:00:00 2001 From: Barbara Valdez <34872381+barbaravaldez@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:49:37 -0700 Subject: [PATCH 4/7] Create new context menu item for Database (#23771) (#23774) --- extensions/mssql/package.json | 38 +++++++++++++++++-- extensions/mssql/package.nls.json | 1 + .../mssql/src/objectManagement/commands.ts | 3 ++ 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/extensions/mssql/package.json b/extensions/mssql/package.json index 73eff6407bca..9febabc41175 100644 --- a/extensions/mssql/package.json +++ b/extensions/mssql/package.json @@ -83,6 +83,12 @@ "title": "%title.newObject%", "icon": "$(add)" }, + { + "command": "mssql.newDatabase", + "category": "MSSQL", + "title": "%title.newDatabase%", + "icon": "$(add)" + }, { "command": "mssql.objectProperties", "category": "MSSQL", @@ -490,6 +496,10 @@ "command": "mssql.newObject", "when": "false" }, + { + "command": "mssql.newDatabase", + "when": "false" + }, { "command": "mssql.objectProperties", "when": "false" @@ -526,12 +536,22 @@ }, { "command": "mssql.newObject", - "when": "connectionProvider == MSSQL && nodeType == Folder && objectType =~ /^(ServerLevelLogins|Users|ServerLevelServerRoles|ApplicationRoles|DatabaseRoles|Databases)$/ && config.workbench.enablePreviewFeatures", + "when": "connectionProvider == MSSQL && nodeType == Folder && objectType =~ /^(ServerLevelLogins|Users|ServerLevelServerRoles|ApplicationRoles|DatabaseRoles)$/ && config.workbench.enablePreviewFeatures", "group": "1_objectManagement@0" }, { "command": "mssql.newObject", - "when": "connectionProvider == MSSQL && nodeType =~ /^(ServerLevelLogin|User|ServerLevelServerRole|ApplicationRole|DatabaseRole|Database)$/ && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures", + "when": "connectionProvider == MSSQL && nodeType =~ /^(ServerLevelLogin|User|ServerLevelServerRole|ApplicationRole|DatabaseRole)$/ && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures", + "group": "1_objectManagement@0" + }, + { + "command": "mssql.newDatabase", + "when": "connectionProvider == MSSQL && nodeType == Folder && objectType == Databases && config.workbench.enablePreviewFeatures", + "group": "1_objectManagement@0" + }, + { + "command": "mssql.newDatabase", + "when": "connectionProvider == MSSQL && nodeType == Database && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures", "group": "1_objectManagement@0" }, { @@ -613,12 +633,22 @@ }, { "command": "mssql.newObject", - "when": "connectionProvider == MSSQL && nodeType == Folder && objectType =~ /^(ServerLevelLogins|Users|ServerLevelServerRoles|ApplicationRoles|DatabaseRoles|Databases)$/ && config.workbench.enablePreviewFeatures", + "when": "connectionProvider == MSSQL && nodeType == Folder && objectType =~ /^(ServerLevelLogins|Users|ServerLevelServerRoles|ApplicationRoles|DatabaseRoles)$/ && config.workbench.enablePreviewFeatures", "group": "1_objectManagement@0" }, { "command": "mssql.newObject", - "when": "connectionProvider == MSSQL && nodeType =~ /^(ServerLevelLogin|User|ServerLevelServerRole|ApplicationRole|DatabaseRole|Database)$/ && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures", + "when": "connectionProvider == MSSQL && nodeType =~ /^(ServerLevelLogin|User|ServerLevelServerRole|ApplicationRole|DatabaseRole)$/ && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures", + "group": "1_objectManagement@0" + }, + { + "command": "mssql.newDatabase", + "when": "connectionProvider == MSSQL && nodeType == Folder && objectType == Databases && config.workbench.enablePreviewFeatures", + "group": "1_objectManagement@0" + }, + { + "command": "mssql.newDatabase", + "when": "connectionProvider == MSSQL && nodeType == Database && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures", "group": "1_objectManagement@0" }, { diff --git a/extensions/mssql/package.nls.json b/extensions/mssql/package.nls.json index 9fb76bb4d150..cab9f992eed6 100644 --- a/extensions/mssql/package.nls.json +++ b/extensions/mssql/package.nls.json @@ -186,6 +186,7 @@ "mssql.objectExplorer.disableGroupBySchemaTitle": "SQL Server: Disable Group By Schema", "mssql.objectExplorer.expandTimeout": "The timeout in seconds for expanding a node in Object Explorer. The default value is 45 seconds.", "title.newObject": "New (Preview)", + "title.newDatabase": "New Database (Preview)", "title.objectProperties": "Properties (Preview)", "title.deleteObject": "Delete (Preview)", "title.renameObject": "Rename (Preview)", diff --git a/extensions/mssql/src/objectManagement/commands.ts b/extensions/mssql/src/objectManagement/commands.ts index bc91a73b33de..b640039eae95 100644 --- a/extensions/mssql/src/objectManagement/commands.ts +++ b/extensions/mssql/src/objectManagement/commands.ts @@ -31,6 +31,9 @@ export function registerObjectManagementCommands(appContext: AppContext) { appContext.extensionContext.subscriptions.push(vscode.commands.registerCommand('mssql.newObject', async (context: azdata.ObjectExplorerContext) => { await handleNewObjectDialogCommand(context, service); })); + appContext.extensionContext.subscriptions.push(vscode.commands.registerCommand('mssql.newDatabase', async (context: azdata.ObjectExplorerContext) => { + await handleNewObjectDialogCommand(context, service); + })); appContext.extensionContext.subscriptions.push(vscode.commands.registerCommand('mssql.objectProperties', async (context: azdata.ObjectExplorerContext) => { await handleObjectPropertiesDialogCommand(context, service); })); From 034d8189462bc7d784e126668f762577c9aa3513 Mon Sep 17 00:00:00 2001 From: Cory Rivera Date: Tue, 11 Jul 2023 12:50:03 -0700 Subject: [PATCH 5/7] Limit Detach Database and Database/Server Properties to insiders and dev builds. (#23750) (#23773) --- extensions/mssql/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/mssql/package.json b/extensions/mssql/package.json index 9febabc41175..8e8fe228c186 100644 --- a/extensions/mssql/package.json +++ b/extensions/mssql/package.json @@ -566,7 +566,7 @@ }, { "command": "mssql.detachDatabase", - "when": "connectionProvider == MSSQL && nodeType == Database && !isCloud && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures", + "when": "connectionProvider == MSSQL && nodeType == Database && !isCloud && !(nodePath =~ /^.*\\/System Databases\\/.*$/) && config.workbench.enablePreviewFeatures && (productQualityType =~ /^(insider|dev)$/ || isDevelopment)", "group": "1_objectManagement@2" }, { @@ -587,7 +587,7 @@ }, { "command": "mssql.objectProperties", - "when": "connectionProvider == MSSQL && serverInfo && !isCloud && nodeType && nodeType =~ /^(Database|Server)$/ && mssql:engineedition != 11 && config.workbench.enablePreviewFeatures", + "when": "connectionProvider == MSSQL && serverInfo && !isCloud && nodeType =~ /^(Database|Server)$/ && mssql:engineedition != 11 && config.workbench.enablePreviewFeatures && (productQualityType =~ /^(insider|dev)$/ || isDevelopment)", "group": "z_objectexplorer@3" }, { From ba8d153982686d208b8780096416f68e8b24c9f2 Mon Sep 17 00:00:00 2001 From: Sakshi Sharma <57200045+SakshiS-harma@users.noreply.github.com> Date: Tue, 11 Jul 2023 11:42:39 -0700 Subject: [PATCH 6/7] Update vscode version for Profiler extension (#23767) * Update vscode version for Profiler extension * Include all versions (*) --- extensions/profiler/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/profiler/package.json b/extensions/profiler/package.json index 2167fa830adc..91a24f7fc6a2 100644 --- a/extensions/profiler/package.json +++ b/extensions/profiler/package.json @@ -8,7 +8,7 @@ "license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt", "icon": "images/extension.png", "engines": { - "vscode": "0.10.0", + "vscode": "*", "azdata": ">=1.45.0" }, "activationEvents": [ From e7a521122b0b62bee22df7d264eee00ee0ceabd1 Mon Sep 17 00:00:00 2001 From: SakshiS-harma Date: Wed, 12 Jul 2023 15:49:16 -0700 Subject: [PATCH 7/7] Add limit on the file size that can be opened with Open XEL feature --- .../services/profiler/browser/profilerService.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sql/workbench/services/profiler/browser/profilerService.ts b/src/sql/workbench/services/profiler/browser/profilerService.ts index 2ff9566a17b8..3ab7b3ed22bf 100644 --- a/src/sql/workbench/services/profiler/browser/profilerService.ts +++ b/src/sql/workbench/services/profiler/browser/profilerService.ts @@ -11,6 +11,7 @@ import { ProfilerColumnEditorDialog } from 'sql/workbench/services/profiler/brow import * as azdata from 'azdata'; import * as nls from 'vs/nls'; +import { promises as fs } from 'fs'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -317,6 +318,18 @@ export class ProfilerService implements IProfilerService { if (fileURIs?.length === 1) { const fileURI = fileURIs[0]; + try { + let fileSize = await (await fs.stat(fileURI.fsPath)).size; + console.log(fileSize); + const fileLimitSize = 1073741824; // 1GB + if (fileSize > fileLimitSize) { + this._notificationService.error(nls.localize('FileTooLarge', "File is too large to open and it may hang ADS. ")); + return false; + } + } catch (err) { + this._notificationService.error(err.message); + } + let profilerInput: ProfilerInput = instantiationService.createInstance(ProfilerInput, undefined, fileURI); await editorService.openEditor(profilerInput, { pinned: true }, ACTIVE_GROUP); profilerInput.setConnectionState(false); // Reset connection to be not connected for File session, so that "Start" is not enabled.