Skip to content

Commit

Permalink
internal changes
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 556138391
  • Loading branch information
zzzaries authored and copybara-github committed Aug 16, 2023
1 parent a9ddc74 commit 031a28c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
12 changes: 9 additions & 3 deletions frontend/app/components/controls/string_filter/string_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ import {Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '
export class StringFilter implements OnChanges {
@Input() dataTable?: google.visualization.DataTable;
@Input() column: number|string = -1;
@Input() value = '';
@Input() strictMatch = false;

columnIndex = -1;
columnLabel = '';
value = '';

@Output()
changed = new EventEmitter<google.visualization.DataTableCellFilter>();
Expand Down Expand Up @@ -45,8 +46,13 @@ export class StringFilter implements OnChanges {
const filter:
google.visualization.DataTableCellFilter = {column: this.columnIndex};
if (this.value) {
filter.test = (value: string) =>
value.toLowerCase().indexOf(this.value) !== -1;
if (this.strictMatch) {
filter.test = (value: string) =>
value.toLowerCase().trim() === this.value.toLowerCase().trim();
} else {
filter.test = (value: string) =>
value.toLowerCase().indexOf(this.value.toLowerCase()) !== -1;
}
}

this.changed.emit(filter);
Expand Down
8 changes: 8 additions & 0 deletions plugin/trace_viewer/tf_trace_viewer/tf-trace-viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,14 @@
'" target="_blank"> see hlo graph for ' +
hloOp + '@' + hloModule + '</a>';
this._eventDetails.appendChild(graphViewLinkElement);

const hloOpStatsLink = new URL(`${window.location.origin}/hlo_stats/${this._sessionId}`);
hloOpStatsLink.searchParams.append("hlo_op_name", event.title);
const hloOpStatsLinkElement = document.createElement('div');
hloOpStatsLinkElement.innerHTML = '<a href="' + hloOpStatsLink.href +
'" target="_blank"> see hlo stats for ' +
hloOp + '</a>';
this._eventDetails.appendChild(hloOpStatsLinkElement);
}
// For `TfrtModelRun` event, add links to the associated MLIR graphs.
if (event.title.includes("TfrtModelRun")) {
Expand Down

0 comments on commit 031a28c

Please sign in to comment.