mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Open query plan link when select XML showplan in the result grid (#1092)
* open query plan link * address comments
This commit is contained in:
@@ -477,7 +477,13 @@ export abstract class GridParentComponent {
|
|||||||
*/
|
*/
|
||||||
xmlLinkHandler = (cellRef: string, row: number, dataContext: JSON, colDef: any) => {
|
xmlLinkHandler = (cellRef: string, row: number, dataContext: JSON, colDef: any) => {
|
||||||
const self = this;
|
const self = this;
|
||||||
self.handleLink(cellRef, row, dataContext, colDef, 'xml');
|
|
||||||
|
let value = self.getCellValueString(dataContext, colDef);
|
||||||
|
if (value.startsWith('<ShowPlanXML') && colDef.name !== 'XML Showplan') {
|
||||||
|
self.handleQueryPlanLink(cellRef, value);
|
||||||
|
} else {
|
||||||
|
self.handleLink(cellRef, row, dataContext, colDef, 'xml');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -488,6 +494,13 @@ export abstract class GridParentComponent {
|
|||||||
self.handleLink(cellRef, row, dataContext, colDef, 'json');
|
self.handleLink(cellRef, row, dataContext, colDef, 'json');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private handleQueryPlanLink(cellRef: string, value: string): void {
|
||||||
|
const self = this;
|
||||||
|
$(cellRef).children('.xmlLink').click(function (): void {
|
||||||
|
self._bootstrapService.queryEditorService.newQueryPlanEditor(value);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private handleLink(cellRef: string, row: number, dataContext: JSON, colDef: any, linkType: string): void {
|
private handleLink(cellRef: string, row: number, dataContext: JSON, colDef: any, linkType: string): void {
|
||||||
const self = this;
|
const self = this;
|
||||||
let value = self.getCellValueString(dataContext, colDef);
|
let value = self.getCellValueString(dataContext, colDef);
|
||||||
|
|||||||
Reference in New Issue
Block a user