mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 17:23:15 -05:00
Centers selected node found by the expensive operation widget (#21103)
This commit is contained in:
@@ -273,7 +273,7 @@ export class AzdataGraphView extends Disposable {
|
||||
this._diagram.clearExpensiveOperatorHighlighting();
|
||||
}
|
||||
|
||||
public highlightExpensiveOperator(predicate: (cell: AzDataGraphCell) => number): boolean {
|
||||
public highlightExpensiveOperator(predicate: (cell: AzDataGraphCell) => number): string {
|
||||
return this._diagram.highlightExpensiveOperator(predicate);
|
||||
}
|
||||
|
||||
|
||||
@@ -301,9 +301,10 @@ export class HighlightExpensiveOperationAction extends Action {
|
||||
const expensiveOperationDelegate: (cell: AzDataGraphCell) => number | undefined = context.getExpensiveOperationDelegate();
|
||||
|
||||
context.executionPlanDiagram.clearExpensiveOperatorHighlighting();
|
||||
context.executionPlanDiagram.highlightExpensiveOperator(expensiveOperationDelegate);
|
||||
// lewissanchez TODO: Add focus logic to center the highlighted node. Removed the error message logic since the expensive operation widget
|
||||
// is only populated with plan metrics that are contained in a plan.
|
||||
const elementId = context.executionPlanDiagram.highlightExpensiveOperator(expensiveOperationDelegate);
|
||||
if (elementId) {
|
||||
context.executionPlanDiagram.centerElement(context.executionPlanDiagram.getElementById(elementId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user