Skip to content

Commit

Permalink
make "value" a property in string_filter component
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 559555098
  • Loading branch information
zzzaries authored and copybara-github committed Aug 23, 2023
1 parent 4bfdd0a commit 7626775
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions frontend/app/components/chart/default_data_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class ReplicaGroupDataProvider extends DefaultDataProvider {
communicationOps = new Set();
// Column indexes
opCategoryIndex?: number; // 'category' column
hloOpNameIndex?: number; // 'operation' column
hloOpNameIndex?: number; // 'hlo_op_expression' column
selfTimeIndex?: number; // 'total_self_time' column

parseData(data: SimpleDataTable) {
Expand All @@ -108,8 +108,10 @@ export class ReplicaGroupDataProvider extends DefaultDataProvider {

// Set the column index member variables.
for (let i = 0; i < data.cols.length; i++) {
// TODO(xprof) ids defined in hlo_stats.cc is also hard coded here and in
// hlo_stats.ts, try to decouple or add "if change then" lint
if (data.cols[i].id === 'category') this.opCategoryIndex = i;
if (data.cols[i].id === 'operation') this.hloOpNameIndex = i;
if (data.cols[i].id === 'hlo_op_expression') this.hloOpNameIndex = i;
if (data.cols[i].id === 'total_self_time') this.selfTimeIndex = i;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ 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 = '';

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

@Output()
changed = new EventEmitter<google.visualization.DataTableCellFilter>();
Expand Down

0 comments on commit 7626775

Please sign in to comment.