Property view labels update when execution plan orientation changes (#19924)

* Updates properties view title when the orientation changes

* Property orientation labels change when the plan orientation changes.

* Renames top and bottom containers to secondary and primary

* Minor clean up

* Removes unnecessary class members

* Promotes constants to module level

* Moves function to module level

* Renames value1 and value2 to primary and secondary

* Replaces orientation string literal type with enum

* Resolves undefined orientation bug

* Removes unused orientation getter

* Updates property table columns only

* Uses orientation enum in editor view and properties view

* Clean up
This commit is contained in:
Lewis Sanchez
2022-07-07 13:26:08 -07:00
committed by GitHub
parent 9cfa1436d9
commit 5fbea7a39c
4 changed files with 131 additions and 56 deletions

View File

@@ -33,7 +33,7 @@ export class ExecutionPlanPropertiesView extends ExecutionPlanPropertiesViewBase
public set graphElement(element: azdata.executionPlan.ExecutionPlanNode | azdata.executionPlan.ExecutionPlanEdge) {
this._model.graphElement = element;
this.addDataToTable();
this.refreshPropertiesTable();
}
public sortPropertiesAlphabetically(props: azdata.executionPlan.ExecutionPlanGraphElementProperty[]): azdata.executionPlan.ExecutionPlanGraphElementProperty[] {
@@ -79,7 +79,7 @@ export class ExecutionPlanPropertiesView extends ExecutionPlanPropertiesViewBase
});
}
public addDataToTable(): void {
public refreshPropertiesTable(): void {
if (this._model.graphElement) {
const nodeName = (<azdata.executionPlan.ExecutionPlanNode>this._model.graphElement).name;
this._operationName.innerText = nodeName ? removeLineBreaks(nodeName) : localize('executionPlanPropertiesEdgeOperationName', "Edge"); //since edges do not have names like node, we set the operation name to 'Edge'