Skip to content

Commit

Permalink
Test view : Refresh sentences when changing bot/namespace (#1698)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuffer authored Jul 31, 2024
1 parent 197a7a8 commit a7505db
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bot/admin/web/src/app/test/dialog/bot-dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,14 @@ export class BotDialogComponent implements OnInit, OnDestroy {

ngOnInit() {
this.rest.errorEmitter.pipe(takeUntil(this.destroy)).subscribe((e) => (this.loading = false));
this.state.configurationChange.pipe(takeUntil(this.destroy)).subscribe((_) => this.clear());

this.state.configurationChange.pipe(takeUntil(this.destroy)).subscribe((_) => {
this.loading = true;
this.clear();
this.fillTestPlanFilter();
this.getRecentSentences();
});

this.fillTestPlanFilter();
this.getRecentSentences();

Expand Down Expand Up @@ -309,6 +316,7 @@ export class BotDialogComponent implements OnInit, OnDestroy {
.pipe(take(1))
.subscribe((res) => {
this.recentSentences = res.rows.map((r) => r.text);
this.loading = false;
});
}

Expand Down

0 comments on commit a7505db

Please sign in to comment.