Skip to content

Commit

Permalink
Double click on experiment in trace explorer to open it
Browse files Browse the repository at this point in the history
fixes #279

Signed-off-by: muddana-satish <satish.muddana@ericsson.com>
  • Loading branch information
muddana-satish authored and PatrickTasse committed Mar 19, 2021
1 parent eec24f7 commit 33a500c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export class TraceExplorerOpenedTracesWidget extends ReactWidget {
event.stopPropagation();
}

protected doHandleDoubleClickEvent(event: React.MouseEvent<HTMLDivElement>, traceUUID: string): void {
this.openExperiment(traceUUID);
}

public openExperiment(traceUUID: string): void {
this.commandService.executeCommand(TraceViewerCommand.id, { traceUUID });
}
Expand Down Expand Up @@ -176,6 +180,7 @@ export class TraceExplorerOpenedTracesWidget extends ReactWidget {
style={props.style}
onClick={this.handleOnExperimentSelected}
onContextMenu={event => { this.handleContextMenuEvent(event, traceUUID); }}
onDoubleClick={event => { this.handleDoubleClickEvent(event, traceUUID); }}
data-id={`${props.index}`}>
<div className='trace-element-container'>
<div className='trace-element-info' >
Expand Down Expand Up @@ -274,6 +279,7 @@ export class TraceExplorerOpenedTracesWidget extends ReactWidget {

protected handleOnExperimentSelected = (e: React.MouseEvent<HTMLDivElement>): void => this.doHandleOnExperimentSelected(e);
protected handleContextMenuEvent = (e: React.MouseEvent<HTMLDivElement>, traceUUID: string): void => this.doHandleContextMenuEvent(e, traceUUID);
protected handleDoubleClickEvent = (e: React.MouseEvent<HTMLDivElement>, traceUUID: string): void => this.doHandleDoubleClickEvent(e, traceUUID);

protected doHandleOnExperimentSelected(e: React.MouseEvent<HTMLDivElement>): void {
const index = Number(e.currentTarget.getAttribute('data-id'));
Expand Down

0 comments on commit 33a500c

Please sign in to comment.