Adding properties view and action bar to graph and fixing styling. (#18185)

* Adding properties view and action bar to graph.

* Open Graph File

* replacing innerhtml with  innertext

* Fixing floating promises

* Fixed typo

* renaming

* Fixing hardcoded colors and comments

* Removing todo and hardcoded colors

* renaming method

* removed unused contract

* Fixed path in comment

* converting div to button

* adding checks to table width and height setter

* Make method name more meaningful

* adding method return types

* concising repeated logic

* removing unused styling

* better sorting logic

* Fixing graph parsing
Renaming some stuff
Implementing IDisposable

* Fixing bad props logic

* Fixed image loading issue

* Removing hardcoded colors

* Adding comments to localize and handling undefined cases in sort

* Changed ch to px

* moving util function to strings
This commit is contained in:
Aasim Khan
2022-02-02 14:17:01 -08:00
committed by GitHub
parent de5090e47a
commit e40c31559a
15 changed files with 1222 additions and 525 deletions

View File

@@ -185,7 +185,7 @@ export class QueryResultsView extends Disposable {
this._panelView = this._register(new TabbedPanel(container, { showHeaderWhenSingleView: true }));
this._register(attachTabbedPanelStyler(this._panelView, themeService));
this.qpTab = this._register(new QueryPlanTab());
this.qp2Tab = this._register(new QueryPlan2Tab());
this.qp2Tab = this._register(this.instantiationService.createInstance(QueryPlan2Tab));
this.topOperationsTab = this._register(new TopOperationsTab(instantiationService));
this._panelView.pushTab(this.resultsTab);
@@ -254,6 +254,8 @@ export class QueryResultsView extends Disposable {
if (!this.input.state.visibleTabs.has(this.qp2Tab.identifier)) {
this.showPlan2();
}
// Adding graph to state and tab as they become available
this.input.state.queryPlan2State.graphs.push(...e.planGraphs);
this.qp2Tab.view.addGraphs(e.planGraphs);
}
}));
@@ -334,6 +336,7 @@ export class QueryResultsView extends Disposable {
if (input) {
this.resultsTab.view.state = input.state.gridPanelState;
this.qpTab.view.setState(input.state.queryPlanState);
this.qp2Tab.view.addGraphs(input.state.queryPlan2State.graphs);
this.topOperationsTab.view.setState(input.state.topOperationsState);
this.chartTab.view.state = input.state.chartState;
this.dynamicModelViewTabs.forEach((dynamicTab: QueryModelViewTab) => {
@@ -454,6 +457,7 @@ export class QueryResultsView extends Disposable {
public hidePlan2() {
if (this._panelView.contains(this.qp2Tab)) {
this.qp2Tab.clear();
this.input.state.queryPlan2State.clearQueryPlan2State();
this._panelView.removeTab(this.qp2Tab.identifier);
}
}