Readd query plan (#2409)

* fix grid links

* formatting

* remove commented code

* adding query plan

* asd

* add query plan

* fix title
This commit is contained in:
Anthony Dresser
2018-09-05 12:11:33 -07:00
committed by GitHub
parent ce0c955c29
commit 1356f0bcf6
7 changed files with 122 additions and 3 deletions

View File

@@ -10,13 +10,14 @@ import { IQueryModelService } from '../execution/queryModel';
import QueryRunner from 'sql/parts/query/execution/queryRunner';
import { MessagePanel } from './messagePanel';
import { GridPanel } from './gridPanel';
import { ChartTab } from './charting/chartTab';
import { QueryPlanTab } from 'sql/parts/queryPlan/queryPlan';
import * as nls from 'vs/nls';
import * as UUID from 'vs/base/common/uuid';
import { PanelViewlet } from 'vs/workbench/browser/parts/views/panelViewlet';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import * as DOM from 'vs/base/browser/dom';
import { ChartTab } from './charting/chartTab';
class ResultsView implements IPanelView {
private panelViewlet: PanelViewlet;
@@ -79,6 +80,7 @@ export class QueryResultsView {
private _input: QueryResultsInput;
private resultsTab: ResultsTab;
private chartTab: ChartTab;
private qpTab: QueryPlanTab;
constructor(
container: HTMLElement,
@@ -88,6 +90,7 @@ export class QueryResultsView {
this.resultsTab = new ResultsTab(instantiationService);
this.chartTab = new ChartTab(instantiationService);
this._panelView = new TabbedPanel(container, { showHeaderWhenSingleView: false });
this.qpTab = new QueryPlanTab();
}
public style() {
@@ -119,4 +122,13 @@ export class QueryResultsView {
this._panelView.showTab(this.chartTab.identifier);
this.chartTab.chart(dataId);
}
public showPlan(xml: string) {
if (!this._panelView.contains(this.qpTab)) {
this._panelView.pushTab(this.qpTab);
}
this._panelView.showTab(this.qpTab.identifier);
this.qpTab.view.showPlan(xml);
}
}