mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix for query select command text in manage tab for Kusto tables (#13916)
* Fix for text in manage tab for Kusto tables * addressed comment Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMess
|
|||||||
export class ScriptSelectAction extends Action {
|
export class ScriptSelectAction extends Action {
|
||||||
public static ID = 'selectTop';
|
public static ID = 'selectTop';
|
||||||
public static LABEL = nls.localize('scriptSelect', "Select Top 1000");
|
public static LABEL = nls.localize('scriptSelect', "Select Top 1000");
|
||||||
|
public static KUSTOLABEL = nls.localize('scriptKustoSelect', "Take 10");
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
id: string, label: string,
|
id: string, label: string,
|
||||||
|
|||||||
@@ -256,7 +256,27 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerWidgetContext, {
|
|||||||
id: commands.ExplorerScriptSelectAction.ID,
|
id: commands.ExplorerScriptSelectAction.ID,
|
||||||
title: commands.ExplorerScriptSelectAction.LABEL
|
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
|
order: 2
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user