mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Adding group by schema button to OE (#22083)
This commit is contained in:
@@ -95,12 +95,38 @@
|
|||||||
{
|
{
|
||||||
"command": "mssql.enableGroupBySchema",
|
"command": "mssql.enableGroupBySchema",
|
||||||
"category": "MSSQL",
|
"category": "MSSQL",
|
||||||
"title": "%mssql.objectExplorer.enableGroupBySchema%"
|
"title": "%mssql.objectExplorer.enableGroupBySchema%",
|
||||||
|
"icon": {
|
||||||
|
"dark": "resources/dark/groupBySchemaEnabled_inverse.svg",
|
||||||
|
"light": "resources/light/groupBySchemaEnabled.svg"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "mssql.disableGroupBySchema",
|
"command": "mssql.disableGroupBySchema",
|
||||||
"category": "MSSQL",
|
"category": "MSSQL",
|
||||||
"title": "%mssql.objectExplorer.disableGroupBySchema%"
|
"title": "%mssql.objectExplorer.disableGroupBySchema%",
|
||||||
|
"icon": {
|
||||||
|
"dark": "resources/dark/groupBySchemaDisabled_inverse.svg",
|
||||||
|
"light": "resources/light/groupBySchemaDisabled.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "mssql.enableGroupBySchemaTitle",
|
||||||
|
"category": "MSSQL",
|
||||||
|
"title": "%mssql.objectExplorer.enableGroupBySchemaTitle%",
|
||||||
|
"icon": {
|
||||||
|
"dark": "resources/dark/groupBySchemaEnabled_inverse.svg",
|
||||||
|
"light": "resources/light/groupBySchemaEnabled.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "mssql.disableGroupBySchemaTitle",
|
||||||
|
"category": "MSSQL",
|
||||||
|
"title": "%mssql.objectExplorer.disableGroupBySchemaTitle%",
|
||||||
|
"icon": {
|
||||||
|
"dark": "resources/dark/groupBySchemaDisabled_inverse.svg",
|
||||||
|
"light": "resources/light/groupBySchemaDisabled.svg"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outputChannels": [
|
"outputChannels": [
|
||||||
@@ -541,6 +567,18 @@
|
|||||||
"command": "mssql.exportNotebookToSql",
|
"command": "mssql.exportNotebookToSql",
|
||||||
"when": "config.workbench.enablePreviewFeatures && providerId == sql"
|
"when": "config.workbench.enablePreviewFeatures && providerId == sql"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"view/title": [
|
||||||
|
{
|
||||||
|
"command": "mssql.enableGroupBySchemaTitle",
|
||||||
|
"when": "view == dataExplorer.servers && !config.mssql.objectExplorer.groupBySchema",
|
||||||
|
"group": "navigation@4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "mssql.disableGroupBySchemaTitle",
|
||||||
|
"when": "view == dataExplorer.servers && config.mssql.objectExplorer.groupBySchema",
|
||||||
|
"group": "navigation@5"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dashboard": {
|
"dashboard": {
|
||||||
|
|||||||
@@ -185,6 +185,8 @@
|
|||||||
"mssql.objectExplorer.groupBySchema": "When enabled, the database objects in Object Explorer will be categorized by schema.",
|
"mssql.objectExplorer.groupBySchema": "When enabled, the database objects in Object Explorer will be categorized by schema.",
|
||||||
"mssql.objectExplorer.enableGroupBySchema":"Enable Group By Schema",
|
"mssql.objectExplorer.enableGroupBySchema":"Enable Group By Schema",
|
||||||
"mssql.objectExplorer.disableGroupBySchema":"Disable Group By Schema",
|
"mssql.objectExplorer.disableGroupBySchema":"Disable Group By Schema",
|
||||||
|
"mssql.objectExplorer.enableGroupBySchemaTitle": "SQL Server: Enable Group By Schema",
|
||||||
|
"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.",
|
"mssql.objectExplorer.expandTimeout": "The timeout in seconds for expanding a node in Object Explorer. The default value is 45 seconds.",
|
||||||
"title.newServerRole": "New Server Role",
|
"title.newServerRole": "New Server Role",
|
||||||
"title.newLogin": "New Login",
|
"title.newLogin": "New Login",
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||||
|
<g id="canvas" opacity="0" fill="none">
|
||||||
|
<path d="M16,16H0V0H16Z" opacity="0" fill="none" />
|
||||||
|
</g>
|
||||||
|
<g id="level-1">
|
||||||
|
<g opacity="0.75">
|
||||||
|
<path d="M13,8.5V11H12V9H5v2H4V8.5L4.5,8H8V6H9V8h3.5Z" fill="#fff" />
|
||||||
|
</g>
|
||||||
|
<path d="M6.5,11h-4l-.5.5v3l.5.5h4l.5-.5v-3ZM6,14H3V12H6Zm8.5-3h-4l-.5.5v3l.5.5h4l.5-.5v-3ZM14,14H11V12h3ZM7,4.879l-1-1V2.5L6.5,2h4l.5.5v3l-.5.5h-4l-.043-.043.811-.811L7.121,5H10V3H7Z" fill="#fff" />
|
||||||
|
<path d="M2.5,11.5h4v3h-4Zm8,0v3h4v-3Zm0-6v-3h-4V4.379l.768.767L6.914,5.5Z" fill="#212121" opacity="0.1" />
|
||||||
|
<path d="M3.707,3,5.854,5.146l-.708.708L3,3.707.854,5.854.146,5.146,2.293,3,.146.854.854.146,3,2.293,5.146.146l.708.708Z" fill="#FF0000" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 755 B |
@@ -0,0 +1,20 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||||
|
<defs>
|
||||||
|
<style>.canvas{fill: none; opacity: 0;}.light-defaultgrey{fill: #fff; opacity: 1;}.light-defaultgrey-10{fill: #212121; opacity: 0.1;}.cls-1952ad0b7-668d-55f4-b661-43e649f93ef9{opacity:0.75;}</style>
|
||||||
|
</defs>
|
||||||
|
<title>IconLightHierarchy</title>
|
||||||
|
<g id="canvas" class="canvas">
|
||||||
|
<path class="canvas" d="M16,16H0V0H16Z" />
|
||||||
|
</g>
|
||||||
|
<g id="level-1">
|
||||||
|
<g class="cls-1952ad0b7-668d-55f4-b661-43e649f93ef9">
|
||||||
|
<path class="light-defaultgrey" d="M13,7.5V10H12V8H3v2H2V7.5L2.5,7H7V5H8V7h4.5Z" />
|
||||||
|
</g>
|
||||||
|
<path class="light-defaultgrey-10" d="M9.5.5v4h-4V.5Z" />
|
||||||
|
<path class="light-defaultgrey" d="M9.5,0h-4L5,.5v4l.5.5h4l.5-.5V.5ZM9,4H6V1H9Z" />
|
||||||
|
<path class="light-defaultgrey-10" d="M4.5,10.5v4H.5v-4Z" />
|
||||||
|
<path class="light-defaultgrey" d="M4.5,10H.5l-.5.5v4l.5.5h4l.5-.5v-4ZM4,14H1V11H4Z" />
|
||||||
|
<path class="light-defaultgrey-10" d="M14.5,10.5v4h-4v-4Z" />
|
||||||
|
<path class="light-defaultgrey" d="M14.5,10h-4l-.5.5v4l.5.5h4l.5-.5v-4ZM14,14H11V11h3Z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
13
extensions/mssql/resources/light/groupByschemaDisabled.svg
Normal file
13
extensions/mssql/resources/light/groupByschemaDisabled.svg
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||||
|
<g id="canvas" opacity="0" fill="none">
|
||||||
|
<path d="M16,16H0V0H16Z" opacity="0" fill="none" />
|
||||||
|
</g>
|
||||||
|
<g id="level-1">
|
||||||
|
<g opacity="0.75">
|
||||||
|
<path d="M13,8.5V11H12V9H5v2H4V8.5L4.5,8H8V6H9V8h3.5Z" fill="#212121" />
|
||||||
|
</g>
|
||||||
|
<path d="M6.5,11h-4l-.5.5v3l.5.5h4l.5-.5v-3ZM6,14H3V12H6Zm8.5-3h-4l-.5.5v3l.5.5h4l.5-.5v-3ZM14,14H11V12h3ZM7,4.879l-1-1V2.5L6.5,2h4l.5.5v3l-.5.5h-4l-.043-.043.811-.811L7.121,5H10V3H7Z" fill="#212121" />
|
||||||
|
<path d="M2.5,11.5h4v3h-4Zm8,0v3h4v-3Zm0-6v-3h-4V4.379l.768.767L6.914,5.5Z" fill="#212121" opacity="0.1" />
|
||||||
|
<path d="M3.707,3,5.854,5.146l-.708.708L3,3.707.854,5.854.146,5.146,2.293,3,.146.854.854.146,3,2.293,5.146.146l.708.708Z" fill="#c50b17" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 761 B |
20
extensions/mssql/resources/light/groupByschemaEnabled.svg
Normal file
20
extensions/mssql/resources/light/groupByschemaEnabled.svg
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||||
|
<defs>
|
||||||
|
<style>.canvas{fill: none; opacity: 0;}.light-defaultgrey{fill: #212121; opacity: 1;}.light-defaultgrey-10{fill: #212121; opacity: 0.1;}.cls-1952ad0b7-668d-55f4-b661-43e649f93ef9{opacity:0.75;}</style>
|
||||||
|
</defs>
|
||||||
|
<title>IconLightHierarchy</title>
|
||||||
|
<g id="canvas" class="canvas">
|
||||||
|
<path class="canvas" d="M16,16H0V0H16Z" />
|
||||||
|
</g>
|
||||||
|
<g id="level-1">
|
||||||
|
<g class="cls-1952ad0b7-668d-55f4-b661-43e649f93ef9">
|
||||||
|
<path class="light-defaultgrey" d="M13,7.5V10H12V8H3v2H2V7.5L2.5,7H7V5H8V7h4.5Z" />
|
||||||
|
</g>
|
||||||
|
<path class="light-defaultgrey-10" d="M9.5.5v4h-4V.5Z" />
|
||||||
|
<path class="light-defaultgrey" d="M9.5,0h-4L5,.5v4l.5.5h4l.5-.5V.5ZM9,4H6V1H9Z" />
|
||||||
|
<path class="light-defaultgrey-10" d="M4.5,10.5v4H.5v-4Z" />
|
||||||
|
<path class="light-defaultgrey" d="M4.5,10H.5l-.5.5v4l.5.5h4l.5-.5v-4ZM4,14H1V11H4Z" />
|
||||||
|
<path class="light-defaultgrey-10" d="M14.5,10.5v4h-4v-4Z" />
|
||||||
|
<path class="light-defaultgrey" d="M14.5,10h-4l-.5.5v4l.5.5h4l.5-.5v-4ZM14,14H11V11h3Z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -31,3 +31,5 @@ export const configObjectExplorerGroupBySchemaFlagName = 'mssql.objectExplorer.g
|
|||||||
// COMMANDNAMES //////////////////////////////////////////////////////////
|
// COMMANDNAMES //////////////////////////////////////////////////////////
|
||||||
export const cmdObjectExplorerEnableGroupBySchemaCommand = 'mssql.enableGroupBySchema';
|
export const cmdObjectExplorerEnableGroupBySchemaCommand = 'mssql.enableGroupBySchema';
|
||||||
export const cmdObjectExplorerDisableGroupBySchemaCommand = 'mssql.disableGroupBySchema';
|
export const cmdObjectExplorerDisableGroupBySchemaCommand = 'mssql.disableGroupBySchema';
|
||||||
|
export const cmdObjectExplorerEnabbleGroupBySchemaTitleCommand = 'mssql.enableGroupBySchemaTitle';
|
||||||
|
export const cmdObjectExplorerDisableGroupBySchemaTitleCommand = 'mssql.disableGroupBySchemaTitle';
|
||||||
|
|||||||
@@ -90,10 +90,22 @@ export async function activate(context: vscode.ExtensionContext): Promise<IExten
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerEnableGroupBySchemaCommand, async () => {
|
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerEnableGroupBySchemaCommand, async () => {
|
||||||
|
TelemetryReporter.sendActionEvent(TelemetryViews.MssqlObjectExplorer, TelemetryActions.EnableGroupBySchemaContextMenu)
|
||||||
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, true, true);
|
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, true, true);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerDisableGroupBySchemaCommand, async () => {
|
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerDisableGroupBySchemaCommand, async () => {
|
||||||
|
TelemetryReporter.sendActionEvent(TelemetryViews.MssqlObjectExplorer, TelemetryActions.DisableGroupBySchemaContextMenu)
|
||||||
|
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, false, true);
|
||||||
|
}));
|
||||||
|
|
||||||
|
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerEnabbleGroupBySchemaTitleCommand, async () => {
|
||||||
|
TelemetryReporter.sendActionEvent(TelemetryViews.MssqlObjectExplorer, TelemetryActions.EnableGroupByServerViewTitleAction)
|
||||||
|
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, true, true);
|
||||||
|
}));
|
||||||
|
|
||||||
|
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerDisableGroupBySchemaTitleCommand, async () => {
|
||||||
|
TelemetryReporter.sendActionEvent(TelemetryViews.MssqlObjectExplorer, TelemetryActions.DisableGroupByServerViewTitleAction)
|
||||||
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, false, true);
|
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, false, true);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@@ -84,4 +84,8 @@ export enum TelemetryViews {
|
|||||||
export enum TelemetryActions {
|
export enum TelemetryActions {
|
||||||
GroupBySchemaEnabled = 'objectExplorerGroupBySchemaEnabled',
|
GroupBySchemaEnabled = 'objectExplorerGroupBySchemaEnabled',
|
||||||
GroupBySchemaDisabled = 'objectExplorerGroupBySchemaDisabled',
|
GroupBySchemaDisabled = 'objectExplorerGroupBySchemaDisabled',
|
||||||
|
EnableGroupBySchemaContextMenu = 'objectExplorerEnableGroupBySchemaContextMenu',
|
||||||
|
DisableGroupBySchemaContextMenu = 'objectExplorerDisableGroupBySchemaContextMenu',
|
||||||
|
EnableGroupByServerViewTitleAction = 'objectExplorerEnableGroupByServerViewTitleAction',
|
||||||
|
DisableGroupByServerViewTitleAction = 'objectExplorerDisableGroupByServerViewTitleAction',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ actionRegistry.registerWorkbenchAction(
|
|||||||
|
|
||||||
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
||||||
group: 'navigation',
|
group: 'navigation',
|
||||||
order: 10,
|
order: 1,
|
||||||
command: {
|
command: {
|
||||||
id: AddServerAction.ID,
|
id: AddServerAction.ID,
|
||||||
title: AddServerAction.LABEL,
|
title: AddServerAction.LABEL,
|
||||||
@@ -85,7 +85,7 @@ MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
|||||||
|
|
||||||
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
||||||
group: 'navigation',
|
group: 'navigation',
|
||||||
order: 20,
|
order: 2,
|
||||||
command: {
|
command: {
|
||||||
id: AddServerGroupAction.ID,
|
id: AddServerGroupAction.ID,
|
||||||
title: AddServerGroupAction.LABEL,
|
title: AddServerGroupAction.LABEL,
|
||||||
@@ -96,7 +96,7 @@ MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
|||||||
|
|
||||||
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
||||||
group: 'navigation',
|
group: 'navigation',
|
||||||
order: 30,
|
order: 3,
|
||||||
command: {
|
command: {
|
||||||
id: ActiveConnectionsFilterAction.ID,
|
id: ActiveConnectionsFilterAction.ID,
|
||||||
title: ActiveConnectionsFilterAction.SHOW_ACTIVE_CONNECTIONS_LABEL,
|
title: ActiveConnectionsFilterAction.SHOW_ACTIVE_CONNECTIONS_LABEL,
|
||||||
|
|||||||
Reference in New Issue
Block a user