diff --git a/src/sql/workbench/browser/scriptingActions.ts b/src/sql/workbench/browser/scriptingActions.ts index 525859a4ae..63bced2725 100644 --- a/src/sql/workbench/browser/scriptingActions.ts +++ b/src/sql/workbench/browser/scriptingActions.ts @@ -15,6 +15,7 @@ import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMess export class ScriptSelectAction extends Action { public static ID = 'selectTop'; public static LABEL = nls.localize('scriptSelect', "Select Top 1000"); + public static KUSTOLABEL = nls.localize('scriptKustoSelect', "Take 10"); constructor( id: string, label: string, diff --git a/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts b/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts index 2a6453bae2..60f8b2b4dd 100644 --- a/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts +++ b/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts @@ -256,7 +256,27 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerWidgetContext, { id: commands.ExplorerScriptSelectAction.ID, title: commands.ExplorerScriptSelectAction.LABEL }, - when: ContextKeyExpr.or(ItemContextKey.ItemType.isEqualTo('view'), ItemContextKey.ItemType.isEqualTo('table')), + when: + ContextKeyExpr.and( + ItemContextKey.ConnectionProvider.notEqualsTo('kusto'), + ContextKeyExpr.or( + ItemContextKey.ItemType.isEqualTo('view'), + ItemContextKey.ItemType.isEqualTo('table') + ) + ), + order: 2 +}); + +MenuRegistry.appendMenuItem(MenuId.ExplorerWidgetContext, { + command: { + id: commands.ExplorerScriptSelectAction.ID, + title: commands.ExplorerScriptSelectAction.KUSTOLABEL + }, + when: + ContextKeyExpr.and( + ItemContextKey.ConnectionProvider.isEqualTo('kusto'), + ItemContextKey.ItemType.isEqualTo('table') + ), order: 2 });