mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fix link cell not working issue (#23223)
This commit is contained in:
@@ -267,6 +267,7 @@ class DataResourceTable extends GridTableBase<any> {
|
|||||||
this._chart.onOptionsChange(options => {
|
this._chart.onOptionsChange(options => {
|
||||||
this.setChartOptions(options);
|
this.setChartOptions(options);
|
||||||
});
|
});
|
||||||
|
this.providerId = cellModel.notebookModel.context?.providerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get gridDataProvider(): IGridDataProvider {
|
public get gridDataProvider(): IGridDataProvider {
|
||||||
|
|||||||
@@ -798,6 +798,7 @@ export abstract class GridTableBase<T> extends Disposable implements IView, IQue
|
|||||||
const subset = await this.getRowData(event.cell.row, 1);
|
const subset = await this.getRowData(event.cell.row, 1);
|
||||||
const value = subset[0][event.cell.cell - 1];
|
const value = subset[0][event.cell.cell - 1];
|
||||||
if (column.isXml || (this.gridConfig.showJsonAsLink && isJsonCell(value))) {
|
if (column.isXml || (this.gridConfig.showJsonAsLink && isJsonCell(value))) {
|
||||||
|
if (column.isXml && this.providerId) {
|
||||||
const result = await this.executionPlanService.isExecutionPlan(this.providerId, value.displayValue);
|
const result = await this.executionPlanService.isExecutionPlan(this.providerId, value.displayValue);
|
||||||
if (result.isExecutionPlan) {
|
if (result.isExecutionPlan) {
|
||||||
const executionPlanGraphInfo = {
|
const executionPlanGraphInfo = {
|
||||||
@@ -807,8 +808,9 @@ export abstract class GridTableBase<T> extends Disposable implements IView, IQue
|
|||||||
|
|
||||||
const executionPlanInput = this.instantiationService.createInstance(ExecutionPlanInput, undefined, executionPlanGraphInfo);
|
const executionPlanInput = this.instantiationService.createInstance(ExecutionPlanInput, undefined, executionPlanGraphInfo);
|
||||||
await this.editorService.openEditor(executionPlanInput);
|
await this.editorService.openEditor(executionPlanInput);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
const content = value.displayValue;
|
const content = value.displayValue;
|
||||||
const input = this.untitledEditorService.create({ languageId: column.isXml ? 'xml' : 'json', initialValue: content });
|
const input = this.untitledEditorService.create({ languageId: column.isXml ? 'xml' : 'json', initialValue: content });
|
||||||
await input.resolve();
|
await input.resolve();
|
||||||
@@ -818,7 +820,6 @@ export abstract class GridTableBase<T> extends Disposable implements IView, IQue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private onTableDoubleClick(event: ITableMouseEvent) {
|
private onTableDoubleClick(event: ITableMouseEvent) {
|
||||||
// the first column is already handled by rowNumberColumn plugin.
|
// the first column is already handled by rowNumberColumn plugin.
|
||||||
|
|||||||
Reference in New Issue
Block a user