From 85f6eba82b4528593ba5600d47b1b0252f143f13 Mon Sep 17 00:00:00 2001 From: Patrick Tasse Date: Fri, 5 Jul 2024 14:26:32 -0400 Subject: [PATCH] Update view range during trace indexing While the trace context component updateTrace() loop is iterating, update the unit controller's view range if the current view range is the full range and the full range has changed. If the user zooms the view range, it will stop updating to prevent snapping out of the user's view range. If the users zooms back out to the full range it will restart updating again. After updateTrace() is complete, update the view range only if the current view range is the full range. In TimegraphOutputComponent, use the analysis-running-overflow overlay while the analysis is running. Render the search bar only once the analysis is completed, to prevent unexplained stack overflow in the TextField's InputBase component. Let the analysis-running-overflow pass through pointer events to the underlying layer. Signed-off-by: Patrick Tasse --- .../components/timegraph-output-component.tsx | 107 +++++++++--------- .../components/trace-context-component.tsx | 22 +++- .../style/output-components-style.css | 1 + 3 files changed, 77 insertions(+), 53 deletions(-) diff --git a/packages/react-components/src/components/timegraph-output-component.tsx b/packages/react-components/src/components/timegraph-output-component.tsx index 943aa7e2..63e5aa45 100644 --- a/packages/react-components/src/components/timegraph-output-component.tsx +++ b/packages/react-components/src/components/timegraph-output-component.tsx @@ -689,22 +689,23 @@ export class TimegraphOutputComponent extends AbstractTreeOutputComponent - {this.state.outputStatus === ResponseStatus.COMPLETED ? ( -
{ - ev.preventDefault(); - ev.stopPropagation(); - }} - style={{ height: this.props.style.height }} - > - {this.renderTimeGraphContent()} -
- ) : ( -
- {} - {'Analysis running'} +
{ + ev.preventDefault(); + ev.stopPropagation(); + }} + style={{ height: this.props.style.height }} + > + {this.renderTimeGraphContent()} +
+ {this.state.outputStatus === ResponseStatus.RUNNING && ( +
+
+ + Analysis running +
)} @@ -787,42 +788,44 @@ export class TimegraphOutputComponent extends AbstractTreeOutputComponent {this.getChartContainer()} {this.getMarkersContainer()} -
- - - - ), - className: 'timegraph-search-box', - endAdornment: ( - - - - ) - }} - value={this.state.searchString} - onChange={this.handleSearchChange} - onKeyDown={event => this.onKeyDown(event)} - /> -
+ {this.state.outputStatus === ResponseStatus.COMPLETED && ( +
+ + + + ), + className: 'timegraph-search-box', + endAdornment: ( + + + + ) + }} + value={this.state.searchString} + onChange={this.handleSearchChange} + onKeyDown={event => this.onKeyDown(event)} + /> +
+ )}
); } diff --git a/packages/react-components/src/components/trace-context-component.tsx b/packages/react-components/src/components/trace-context-component.tsx index eeb3e756..d4b1f5de 100644 --- a/packages/react-components/src/components/trace-context-component.tsx +++ b/packages/react-components/src/components/trace-context-component.tsx @@ -236,12 +236,15 @@ export class TraceContextComponent extends React.Component