Adding group by schema to OE (#21941)

* Adding group by schema and updating schema icon

* Adding item context menu

* Fixing command logic

* Adding telemetry for group by and changing default config

* reverting no child nodes error message

* Code cleanup

* Cleaning up constants

* Removing unused imports

* Update extensions/mssql/src/main.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* converting to sendActionEvent

* sendActionEvent

* Adding telemetryViews and telemetry actions

* Fixing localized string

* registering context

---------

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Aasim Khan
2023-02-15 15:18:10 -08:00
committed by GitHub
parent f7fa9bece3
commit d6c35836cc
7 changed files with 116 additions and 31 deletions

View File

@@ -66,6 +66,16 @@
"command": "mssql.designTable",
"category": "MSSQL",
"title": "%title.designTable%"
},
{
"command": "mssql.enableGroupBySchema",
"category": "MSSQL",
"title": "%mssql.objectExplorer.enableGroupBySchema%"
},
{
"command": "mssql.disableGroupBySchema",
"category": "MSSQL",
"title": "%mssql.objectExplorer.disableGroupBySchema%"
}
],
"outputChannels": [
@@ -356,6 +366,11 @@
"type": "boolean",
"default": false,
"description": "%mssql.tableDesigner.preloadDatabaseModel%"
},
"mssql.objectExplorer.groupBySchema": {
"type": "boolean",
"default": false,
"description": "%mssql.objectExplorer.groupBySchema%"
}
}
},
@@ -388,6 +403,14 @@
"command": "mssql.newTable",
"when": "connectionProvider == MSSQL && nodeType == Folder && objectType == Tables",
"group": "0_query@1"
},
{
"command": "mssql.enableGroupBySchema",
"when": "connectionProvider == MSSQL && nodeType && nodeType =~ /^(Server|Database)$/ && !config.mssql.objectExplorer.groupBySchema"
},
{
"command": "mssql.disableGroupBySchema",
"when": "connectionProvider == MSSQL && nodeType && nodeType =~ /^(Server|Database)$/ && config.mssql.objectExplorer.groupBySchema"
}
],
"dataExplorer/context": [
@@ -400,6 +423,14 @@
"command": "mssql.newTable",
"when": "connectionProvider == MSSQL && nodeType == Folder && objectType == Tables",
"group": "connection@1"
},
{
"command": "mssql.enableGroupBySchema",
"when": "connectionProvider == MSSQL && nodeType && nodeType =~ /^(Server|Database)$/ && !config.mssql.objectExplorer.groupBySchema"
},
{
"command": "mssql.disableGroupBySchema",
"when": "connectionProvider == MSSQL && nodeType && nodeType =~ /^(Server|Database)$/ && config.mssql.objectExplorer.groupBySchema"
}
],
"notebook/toolbar": [