Skip to content

Commit

Permalink
Populate properties window on click of a row in events table
Browse files Browse the repository at this point in the history
fixes eclipse-cdt-cloud#348

Signed-off-by: muddana-satish <satish.muddana@ericsson.com>
  • Loading branch information
muddana-satish authored and hriday-panchasara committed Nov 10, 2021
1 parent 94ea4cf commit 295560e
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ export class TableOutputComponent extends AbstractOutputComponent<TableOutputPro

private onEventClick(event: CellClickedEvent) {
const columns = event.columnApi.getAllColumns();
const tooltipObj: { [key: string]: string } = {};
columns.forEach(column => {
const headerName = column.getColDef().headerName;
const colField = column.getColDef().field;
if (headerName && colField && event.data[colField]) {
tooltipObj[headerName] = event.data[colField];
}
});
signalManager().fireTooltipSignal(tooltipObj);
const timestampHeader = columns.find(column => column.getColDef().headerName === 'Timestamp ns');
if (timestampHeader) {
const timestampCol = timestampHeader.getColDef().field;
Expand Down Expand Up @@ -200,7 +209,7 @@ export class TableOutputComponent extends AbstractOutputComponent<TableOutputPro
resizable: true
});
});
}
}

if (!this.showIndexColumn) {
columnsArray[0].cellRenderer = 'loadingRenderer';
Expand Down Expand Up @@ -240,7 +249,7 @@ export class TableOutputComponent extends AbstractOutputComponent<TableOutputPro
const tspClient = this.props.tspClient;
const outputId = this.props.outputDescriptor.id;
const tspClientResponse = await tspClient.fetchTableLines(traceUUID, outputId,
QueryHelper.timeQuery([timestamp], {[QueryHelper.REQUESTED_TABLE_COUNT_KEY]: 1}));
QueryHelper.timeQuery([timestamp], { [QueryHelper.REQUESTED_TABLE_COUNT_KEY]: 1 }));
const lineResponse = tspClientResponse.getModel();
if (!tspClientResponse.isOk() || !lineResponse) {
return undefined;
Expand Down

0 comments on commit 295560e

Please sign in to comment.