Skip to content

Adding Connection Groups #19536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1932bcc
loading OE from config
Benjin May 30, 2025
5401a01
checkpoint - updating nodes in OE broken
Benjin May 31, 2025
40025cd
checkpoint - fixing string
Benjin May 31, 2025
50d4535
Dialog launching
Benjin Jun 2, 2025
ad28d04
Initial UI
Benjin Jun 2, 2025
0687d86
core UI
Benjin Jun 3, 2025
c8151a6
re-merging group manager into connection config
Benjin Jun 3, 2025
356cc07
some cleanup
Benjin Jun 3, 2025
287cd1d
connDialog checkpoint
Benjin Jun 3, 2025
4c614e6
Integration into connection dialog
Benjin Jun 3, 2025
6d0814c
loc
Benjin Jun 3, 2025
674edf7
Pre-cursor
Benjin Jun 3, 2025
18977f1
Tree reveal fixed, children expand state not preserved
Benjin Jun 4, 2025
1ebf838
cleanup
Benjin Jun 4, 2025
14454b7
...working?
Benjin Jun 4, 2025
a4c5575
Adding color support for folder icon
Benjin Jun 4, 2025
68c9231
light theme support for icon
Benjin Jun 4, 2025
b61a7fb
Refresh folder structure when editing group config
Benjin Jun 5, 2025
d3b0fbc
adding color picker
Benjin Jun 5, 2025
8bcec57
adding entrypoints to connection group tree items
Benjin Jun 5, 2025
ef88e84
Adding description tooltip and keyboard handling
Benjin Jun 5, 2025
18d895f
adding drag/drop
Benjin Jun 6, 2025
9cf8b41
cleaning up onConnectionChange logic
Benjin Jun 6, 2025
f2daa30
PR cleanup
Benjin Jun 6, 2025
8a22aa3
Fixing existing tests
Benjin Jun 7, 2025
38fedca
Merge branch 'main' into dev/benjin/serverGroups
Benjin Jun 7, 2025
05c99c6
updated yarn lock
Benjin Jun 7, 2025
7227a81
cleanup
Benjin Jun 7, 2025
ee959c3
Merge branch 'main' into dev/benjin/serverGroups
Benjin Jun 9, 2025
17d89a0
Loc
Benjin Jun 9, 2025
d28fadf
adding tests
Benjin Jun 10, 2025
0f19a71
PR feedback
Benjin Jun 10, 2025
bee45a5
adding additonal telemetry
Benjin Jun 10, 2025
ff3d412
handling nested group removals
Benjin Jun 10, 2025
4e0e4fc
Merge branch 'main' into dev/benjin/serverGroups
Benjin Jun 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ async function generateReactWebviewsBundle() {
entryPoints: {
'addFirewallRule': 'src/reactviews/pages/AddFirewallRule/index.tsx',
'connectionDialog': 'src/reactviews/pages/ConnectionDialog/index.tsx',
'connectionGroup': 'src/reactviews/pages/ConnectionGroup/index.tsx',
'executionPlan': 'src/reactviews/pages/ExecutionPlan/index.tsx',
'tableDesigner': 'src/reactviews/pages/TableDesigner/index.tsx',
'objectExplorerFilter': 'src/reactviews/pages/ObjectExplorerFilter/index.tsx',
Expand Down
31 changes: 29 additions & 2 deletions localization/l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
},
"Close Find": "Close Find",
"Load": "Load",
"Select": "Select",
"Error": "Error",
"Clear All": "Clear All",
"OK": "OK",
Expand Down Expand Up @@ -625,6 +626,18 @@
]
},
"Processing include or exclude all differences operation.": "Processing include or exclude all differences operation.",
"Create New Connection Group": "Create New Connection Group",
"Edit Connection Group: {0}/{0} is the name of the connection group being edited": {
"message": "Edit Connection Group: {0}",
"comment": [
"{0} is the name of the connection group being edited"
]
},
"Enter connection group name": "Enter connection group name",
"Enter description (optional)": "Enter description (optional)",
"Color": "Color",
"Choose color": "Choose color",
"Save Connection Group": "Save Connection Group",
"Object Explorer Filter": "Object Explorer Filter",
"{0} (filtered)": "{0} (filtered)",
"Remind Me Later": "Remind Me Later",
Expand Down Expand Up @@ -1051,7 +1064,7 @@
"Enable Experiences & Reload": "Enable Experiences & Reload",
"Error loading; refresh to try again": "Error loading; refresh to try again",
"No items": "No items",
"We couldnt connect using the current connection information. Would you like to retry the connection or edit the connection profile?": "We couldnt connect using the current connection information. Would you like to retry the connection or edit the connection profile?",
"We couldn't connect using the current connection information. Would you like to retry the connection or edit the connection profile?": "We couldn't connect using the current connection information. Would you like to retry the connection or edit the connection profile?",
"Edit Connection Profile": "Edit Connection Profile",
"Connecting...": "Connecting...",
"Are you sure you want to delete {0}?/{0} is the node label": {
Expand All @@ -1067,12 +1080,17 @@
"{0} is the script type"
]
},
"Select": "Select",
"Insert": "Insert",
"Update": "Update",
"Execute": "Execute",
"Alter": "Alter",
"Signing in to Azure...": "Signing in to Azure...",
"Are you sure you want to delete {0}? This will also delete all connections in this group./{0} is the group name": {
"message": "Are you sure you want to delete {0}? This will also delete all connections in this group.",
"comment": [
"{0} is the group name"
]
},
"Connection Dialog": "Connection Dialog",
"Azure Account": "Azure Account",
"Azure Account is required": "Azure Account is required",
Expand All @@ -1081,11 +1099,14 @@
"Tenant ID": "Tenant ID",
"Select a tenant": "Select a tenant",
"Tenant ID is required": "Tenant ID is required",
"Connection Group": "Connection Group",
"Server is required": "Server is required",
"User name is required": "User name is required",
"Connection string is required": "Connection string is required",
"Sign in": "Sign in",
"Additional parameters": "Additional parameters",
"<Default>": "<Default>",
"Create Connection Group": "Create Connection Group",
"Error loading Azure databases for subscription {0} ({1}). Confirm that you have permission./{0} is the subscription name{1} is the subscription id": {
"message": "Error loading Azure databases for subscription {0} ({1}). Confirm that you have permission.",
"comment": [
Expand Down Expand Up @@ -1293,6 +1314,12 @@
},
"An unknown error occurred. Please try again.": "An unknown error occurred. Please try again.",
"$(plug) Connect to MSSQL": "$(plug) Connect to MSSQL",
"Edit Connection Group - {0}/{0} is the connection group name": {
"message": "Edit Connection Group - {0}",
"comment": [
"{0} is the connection group name"
]
},
"Azure sign in failed.": "Azure sign in failed.",
"Select subscriptions": "Select subscriptions",
"Error loading Azure subscriptions.": "Error loading Azure subscriptions.",
Expand Down
52 changes: 50 additions & 2 deletions localization/xliff/vscode-mssql.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<trans-unit id="++CODE++18b63db64aa0aff55a9f4784ad62abdc2b70cedb95b5e89d5551996cc9bd25ac">
<source xml:lang="en">$(plug) Connect to MSSQL</source>
</trans-unit>
<trans-unit id="++CODE++b52e3b22bc74f576e4eb67d09ab37f79383db3c62b03686731fe777b42e5f0e6">
<source xml:lang="en">&lt;Default&gt;</source>
</trans-unit>
<trans-unit id="++CODE++0d7668d337e375d8ccfc1a69ca8f6e22a0b0c850a78c4770b0c4aa3b0daca630">
<source xml:lang="en">&lt;default&gt;</source>
</trans-unit>
Expand Down Expand Up @@ -140,6 +143,10 @@
<source xml:lang="en">Are you sure you want to delete {0}?</source>
<note>{0} is the node label</note>
</trans-unit>
<trans-unit id="++CODE++06f1783b8fa5a8be694c26e8cea5b2bd668dd7beb434d1271155bae4e7f4a736">
<source xml:lang="en">Are you sure you want to delete {0}? This will also delete all connections in this group.</source>
<note>{0} is the group name</note>
</trans-unit>
<trans-unit id="++CODE++3d283f80f43f1833dcab882ad9efc24a86c0b17b0febb10fc37336590a7016e1">
<source xml:lang="en">Are you sure you want to disconnect?</source>
</trans-unit>
Expand Down Expand Up @@ -347,6 +354,9 @@
<trans-unit id="++CODE++3b961516b68d49db85d3ded5bc5c1129e02be1a647845d77b1eb2ab5260284cb">
<source xml:lang="en">Choose a database from the list below</source>
</trans-unit>
<trans-unit id="++CODE++ac64b397d6dc32aa86e749583723d12ec51ada87e971cfe6c41de1454f7131b0">
<source xml:lang="en">Choose color</source>
</trans-unit>
<trans-unit id="++CODE++be798452e0ca7a38f6487ecb9115f26ba148e2d4475608bdc4277d34d41be0a7">
<source xml:lang="en">Circular reference detected: &apos;{0}&apos; → &apos;{1}&apos; creates a cycle</source>
<note>{0} is source table
Expand Down Expand Up @@ -391,6 +401,9 @@
<trans-unit id="++CODE++55988e28a4e8720a588c5c53fd47616d929a404d3d2af7e6f8ba313dce6dc3e4">
<source xml:lang="en">Collapse All</source>
</trans-unit>
<trans-unit id="++CODE++6b73191a0a4b67420e61d51c9f207c35277eaf18fbbf5beb52a320a23fe09653">
<source xml:lang="en">Color</source>
</trans-unit>
<trans-unit id="++CODE++3fdc9a587693f9e63574b30ec55c2b947a7fb4ba5fd11f0cf213072f53d91bdd">
<source xml:lang="en">Column</source>
</trans-unit>
Expand Down Expand Up @@ -483,6 +496,9 @@
<trans-unit id="++CODE++ddb621f87c5c0baf1158d527d62ad1bf9752e53483d2540591ce3ae35e06fd6b">
<source xml:lang="en">Connection Error</source>
</trans-unit>
<trans-unit id="++CODE++fea70af0cad96e7c97f889724e5dfe0e2d28cbf958e905f5e51ba2584c3d9458">
<source xml:lang="en">Connection Group</source>
</trans-unit>
<trans-unit id="++CODE++d913a8ab7732ff7d26c8afceb2e2706c5c991762df193b236fd839bd3a616cb6">
<source xml:lang="en">Connection Profile could not be updated. Please modify the connection details manually in settings.json and try again.</source>
</trans-unit>
Expand Down Expand Up @@ -542,12 +558,18 @@
<trans-unit id="++CODE++7aa0a3ede22306a6fe14f159fb12acfbb63bad17edf71486aa552c2cd757e5cd">
<source xml:lang="en">Create As Script</source>
</trans-unit>
<trans-unit id="++CODE++48d1f93834dfc421237288d07022d5dc4c61f90e5cc91494cee4960abc481d1d">
<source xml:lang="en">Create Connection Group</source>
</trans-unit>
<trans-unit id="++CODE++71c1ec27a8c136ecdc781c1fd2364676155fbab7abf8837b9075eb3b9f9af7c0">
<source xml:lang="en">Create Connection Profile</source>
</trans-unit>
<trans-unit id="++CODE++0d5e7861b9a1710c8e1d2347dbb8d4dde272143bbeca537d216474ef7bd9193f">
<source xml:lang="en">Create Firewall Rule</source>
</trans-unit>
<trans-unit id="++CODE++037da908d1a0194c30554abfd678cc6ecc4762a021237b597c1205add3de7a4f">
<source xml:lang="en">Create New Connection Group</source>
</trans-unit>
<trans-unit id="++CODE++4cbb437498e0de07f05b633c28f811c67840a2f67e956543557c6085560869e3">
<source xml:lang="en">Create a new firewall rule</source>
</trans-unit>
Expand Down Expand Up @@ -657,6 +679,14 @@
<trans-unit id="++CODE++464c4ffd019e1e9691dcf0537c797353ef2b1c1d4833d3d463e5b74ae4547344">
<source xml:lang="en">Edit</source>
</trans-unit>
<trans-unit id="++CODE++8b45c43d0d9a0c27cbecb2683ef02b292a7f2626dee0f8443d4e62ac3e0e88c4">
<source xml:lang="en">Edit Connection Group - {0}</source>
<note>{0} is the connection group name</note>
</trans-unit>
<trans-unit id="++CODE++82beb1b74986a2b292e8084ee59f9bedf5e0decc13f020369faebf40ce2981c7">
<source xml:lang="en">Edit Connection Group: {0}</source>
<note>{0} is the name of the connection group being edited</note>
</trans-unit>
<trans-unit id="++CODE++a43dafda7f271d0796fb53cc6c2d8f302b8c8892ea0fed0b1096e9c7769f91c1">
<source xml:lang="en">Edit Connection Profile</source>
</trans-unit>
Expand Down Expand Up @@ -690,6 +720,12 @@
<trans-unit id="++CODE++1a77d555bedbf97481907d505c8c8ba64d32d3525b77122e16178dd4054c3c93">
<source xml:lang="en">Ends With</source>
</trans-unit>
<trans-unit id="++CODE++cad17aa68a83418367684821ea4734c877707d1f340846dc7b17b04a8a04c1c0">
<source xml:lang="en">Enter connection group name</source>
</trans-unit>
<trans-unit id="++CODE++91cf329b31a4b1a6c0bdec6de797b6a90ab9309490bd62ec38f98f2d0f6db423">
<source xml:lang="en">Enter description (optional)</source>
</trans-unit>
<trans-unit id="++CODE++b35ebaaf32f469f2fa86b0b2fb67e6f51fae3fb8e6ceaeaea97c2696321a8ee4">
<source xml:lang="en">Enter new column width</source>
</trans-unit>
Expand Down Expand Up @@ -1585,6 +1621,9 @@
<trans-unit id="++CODE++088203b4cd88789e07f4e9a8f05cf6e8c1d0b413ae32d30cae69beeef94784e6">
<source xml:lang="en">Save As</source>
</trans-unit>
<trans-unit id="++CODE++df2839447956141d6503caf44145db003e70b17dc128d5c4fefec188b28d6966">
<source xml:lang="en">Save Connection Group</source>
</trans-unit>
<trans-unit id="++CODE++caf4128d5bf679fef30d60d545684f44efcc2e9a7098df16fcbd0b625580c89f">
<source xml:lang="en">Save Password</source>
</trans-unit>
Expand Down Expand Up @@ -2065,8 +2104,8 @@
<trans-unit id="++CODE++4d7371c8931fdd0178f7cbdabd1fd8260039a824a5c0912e880840b4d841f41e">
<source xml:lang="en">Warnings detected. Please review the changes.</source>
</trans-unit>
<trans-unit id="++CODE++f01e36aaf60d2146e1cf906fce3e055116bd19954ad018908f8a7cd8bd2a8b0c">
<source xml:lang="en">We couldnt connect using the current connection information. Would you like to retry the connection or edit the connection profile?</source>
<trans-unit id="++CODE++f0e54e5d12e2e2f5d8cf453857e0a307a8ecc5e8016b43b3c1c5c93300a40c60">
<source xml:lang="en">We couldn&apos;t connect using the current connection information. Would you like to retry the connection or edit the connection profile?</source>
</trans-unit>
<trans-unit id="++CODE++bf3cd82434efadb9ea501ff44c7d52b0dd98b3d11c0097ba88a10b7fd14d9b54">
<source xml:lang="en">What can we do to improve?</source>
Expand Down Expand Up @@ -2239,6 +2278,9 @@
<trans-unit id="mssql.addObjectExplorerLegacy">
<source xml:lang="en">Add Connection (Legacy)</source>
</trans-unit>
<trans-unit id="mssql.connectionGroups.create">
<source xml:lang="en">Add Connection Group</source>
</trans-unit>
<trans-unit id="mssql.addAadAccount">
<source xml:lang="en">Add Microsoft Entra Account</source>
</trans-unit>
Expand Down Expand Up @@ -2323,6 +2365,9 @@
<trans-unit id="mssql.deleteQueryHistory">
<source xml:lang="en">Delete</source>
</trans-unit>
<trans-unit id="mssql.connectionGroups.delete">
<source xml:lang="en">Delete Connection Group</source>
</trans-unit>
<trans-unit id="mssql.designSchema">
<source xml:lang="en">Design Schema (Preview)</source>
</trans-unit>
Expand All @@ -2344,6 +2389,9 @@
<trans-unit id="mssql.editConnection">
<source xml:lang="en">Edit Connection</source>
</trans-unit>
<trans-unit id="mssql.connectionGroups.edit">
<source xml:lang="en">Edit Connection Group</source>
</trans-unit>
<trans-unit id="mssql.editTable">
<source xml:lang="en">Edit Table</source>
</trans-unit>
Expand Down
63 changes: 60 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"@angular/router": "~3.1.2",
"@angular/upgrade": "~2.1.2",
"@azure/core-paging": "^1.6.2",
"@ctrl/tinycolor": "^4.1.0",
"@dagrejs/dagre": "^1.1.4",
"@eslint/compat": "^1.1.0",
"@eslint/js": "^9.5.0",
Expand Down Expand Up @@ -427,6 +428,12 @@
"title": "%mssql.addObjectExplorer%",
"group": "navigation"
},
{
"command": "mssql.connectionGroups.create",
"when": "view == objectExplorer",
"title": "%mssql.connectionGroups.create%",
"group": "navigation"
},
{
"command": "mssql.startQueryHistoryCapture",
"when": "view == queryHistory && config.mssql.enableQueryHistoryFeature && !config.mssql.enableQueryHistoryCapture",
Expand Down Expand Up @@ -459,6 +466,22 @@
}
],
"view/item/context": [
{
"command": "mssql.addObjectExplorer",
"when": "view == objectExplorer && viewItem =~ /\\btype=(ConnectionGroup)\\b/",
"title": "%mssql.addObjectExplorer%",
"group": "0_MSSQL_connectionGroups@0"
},
{
"command": "mssql.connectionGroups.edit",
"when": "view == objectExplorer && viewItem =~ /\\btype=(ConnectionGroup)\\b/",
"group": "0_MSSQL_connectionGroups@1"
},
{
"command": "mssql.connectionGroups.delete",
"when": "view == objectExplorer && viewItem =~ /\\btype=(ConnectionGroup)\\b/",
"group": "0_MSSQL_connectionGroups@9"
},
{
"command": "mssql.objectExplorerNewQuery",
"when": "view == objectExplorer && viewItem =~ /\\btype=(disconnectedServer|Server|Database)\\b/",
Expand Down Expand Up @@ -546,14 +569,30 @@
},
{
"command": "mssql.refreshObjectExplorerNode",
"when": "view == objectExplorer && viewItem =~ /\\btype=(?!disconnectedServer\\b)[^,]+/ ",
"when": "view == objectExplorer && viewItem =~ /\\btype=(?!(disconnectedServer|ConnectionGroup)\\b)[^,]+/ ",
"group": "5_MSSQL_tree@9999"
},
{
"command": "mssql.objectExplorerChatWithDatabase",
"when": "view == objectExplorer && mssql.copilot.isGHCInstalled && viewItem =~ /\\btype=(disconnectedServer|Server|Database)\\b/",
"group": "MS_SQL@11"
},
{
"command": "mssql.addObjectExplorer",
"when": "view == objectExplorer && viewItem =~ /\\btype=(ConnectionGroup)\\b/",
"title": "%mssql.addObjectExplorer%",
"group": "inline@1"
},
{
"command": "mssql.connectionGroups.edit",
"when": "view == objectExplorer && viewItem =~ /\\btype=(ConnectionGroup)\\b/",
"group": "inline@1"
},
{
"command": "mssql.connectionGroups.delete",
"when": "view == objectExplorer && viewItem =~ /\\btype=(ConnectionGroup)\\b/",
"group": "inline@2"
},
{
"command": "mssql.filterNode",
"when": "view == objectExplorer && viewItem =~ /\\bfilterable=true\\b.*\\bhasFilters=false\\b/",
Expand Down Expand Up @@ -586,7 +625,7 @@
},
{
"command": "mssql.refreshObjectExplorerNode",
"when": "view == objectExplorer && viewItem =~ /\\btype=(?!disconnectedServer\\b)[^,]+/ ",
"when": "view == objectExplorer && viewItem =~ /\\btype=(?!(disconnectedServer|ConnectionGroup)\\b)[^,]+/ ",
"group": "inline@9999"
},
{
Expand Down Expand Up @@ -628,7 +667,7 @@
},
{
"command": "mssql.refreshObjectExplorerNode",
"when": "view == objectExplorer && viewItem =~ /\\btype=(?!disconnectedServer\\b)[^,]+/"
"when": "view == objectExplorer && viewItem =~ /\\btype=(?!(disconnectedServer|ConnectionGroup)\\b)[^,]+/"
},
{
"command": "mssql.scriptSelect",
Expand Down Expand Up @@ -1041,6 +1080,24 @@
"command": "mssql.copilot.rewriteQuery",
"title": "%mssql.copilot.rewriteQuery%",
"category": "MSSQL"
},
{
"command": "mssql.connectionGroups.create",
"title": "%mssql.connectionGroups.create%",
"category": "MSSQL",
"icon": "$(new-folder)"
},
{
"command": "mssql.connectionGroups.edit",
"title": "%mssql.connectionGroups.edit%",
"category": "MSSQL",
"icon": "$(edit)"
},
{
"command": "mssql.connectionGroups.delete",
"title": "%mssql.connectionGroups.delete%",
"category": "MSSQL",
"icon": "$(trash)"
}
],
"keybindings": [
Expand Down
3 changes: 3 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"mssql.changeDatabase": "Change Database",
"mssql.addObjectExplorerLegacy": "Add Connection (Legacy)",
"mssql.addObjectExplorer": "Add Connection",
"mssql.connectionGroups.create": "Add Connection Group",
"mssql.connectionGroups.edit": "Edit Connection Group",
"mssql.connectionGroups.delete": "Delete Connection Group",
"mssql.scriptSelect": "Select Top 1000",
"mssql.scriptCreate": "Script as Create",
"mssql.scriptDelete": "Script as Drop",
Expand Down
Loading
Loading