Skip to content

Commit

Permalink
Internal Changes
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 622017286
  • Loading branch information
zzzaries authored and copybara-github committed Apr 5, 2024
1 parent b01455b commit 30fc866
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
panelClass="panel-override"
[(ngModel)]="params.selectedModule"
[disabled]="useProgramId"
(selectionChange)="onModuleSelectionChange($event)"
>
<mat-option *ngFor="let module of getModuleList()" [value]="module">
{{ module }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Component, EventEmitter, Input, OnChanges, OnDestroy, Output, SimpleChanges} from '@angular/core';
import {MatSelectChange} from '@angular/material/select';
import {type GraphConfigInput} from 'org_xprof/frontend/app/common/interfaces/graph_viewer';
import {ReplaySubject} from 'rxjs';

Expand All @@ -13,6 +14,7 @@ export class GraphConfig implements OnDestroy, OnChanges {
private readonly destroyed = new ReplaySubject<void>(1);

@Output() readonly plot = new EventEmitter<Partial<GraphConfigInput>>();
@Output() readonly updateSelectedModule = new EventEmitter<string>();

/** Form inputs properties */
@Input() initialInputs: GraphConfigInput|undefined = undefined;
Expand Down Expand Up @@ -67,6 +69,10 @@ export class GraphConfig implements OnDestroy, OnChanges {
this.plot.emit(this.params);
}

onModuleSelectionChange(e: MatSelectChange) {
this.updateSelectedModule.emit(e.value);
}

ngOnDestroy() {
// Unsubscribes all pending subscriptions.
this.destroyed.next();
Expand Down

0 comments on commit 30fc866

Please sign in to comment.