From 30fc8666d4f477f545efc672fd6e07d56acf9afb Mon Sep 17 00:00:00 2001 From: Yin Zhang Date: Thu, 4 Apr 2024 17:25:46 -0700 Subject: [PATCH] Internal Changes PiperOrigin-RevId: 622017286 --- .../graph_viewer/graph_config/graph_config.ng.html | 1 + .../components/graph_viewer/graph_config/graph_config.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/frontend/app/components/graph_viewer/graph_config/graph_config.ng.html b/frontend/app/components/graph_viewer/graph_config/graph_config.ng.html index c4c6793a..bf8656b9 100644 --- a/frontend/app/components/graph_viewer/graph_config/graph_config.ng.html +++ b/frontend/app/components/graph_viewer/graph_config/graph_config.ng.html @@ -11,6 +11,7 @@ panelClass="panel-override" [(ngModel)]="params.selectedModule" [disabled]="useProgramId" + (selectionChange)="onModuleSelectionChange($event)" > {{ module }} diff --git a/frontend/app/components/graph_viewer/graph_config/graph_config.ts b/frontend/app/components/graph_viewer/graph_config/graph_config.ts index 3cb7eec9..e4b63661 100644 --- a/frontend/app/components/graph_viewer/graph_config/graph_config.ts +++ b/frontend/app/components/graph_viewer/graph_config/graph_config.ts @@ -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'; @@ -13,6 +14,7 @@ export class GraphConfig implements OnDestroy, OnChanges { private readonly destroyed = new ReplaySubject(1); @Output() readonly plot = new EventEmitter>(); + @Output() readonly updateSelectedModule = new EventEmitter(); /** Form inputs properties */ @Input() initialInputs: GraphConfigInput|undefined = undefined; @@ -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();