Skip to content

Commit a7505db

Browse files
authored
Test view : Refresh sentences when changing bot/namespace (theopenconversationkit#1698)
1 parent 197a7a8 commit a7505db

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bot/admin/web/src/app/test/dialog/bot-dialog.component.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,14 @@ export class BotDialogComponent implements OnInit, OnDestroy {
138138

139139
ngOnInit() {
140140
this.rest.errorEmitter.pipe(takeUntil(this.destroy)).subscribe((e) => (this.loading = false));
141-
this.state.configurationChange.pipe(takeUntil(this.destroy)).subscribe((_) => this.clear());
141+
142+
this.state.configurationChange.pipe(takeUntil(this.destroy)).subscribe((_) => {
143+
this.loading = true;
144+
this.clear();
145+
this.fillTestPlanFilter();
146+
this.getRecentSentences();
147+
});
148+
142149
this.fillTestPlanFilter();
143150
this.getRecentSentences();
144151

@@ -309,6 +316,7 @@ export class BotDialogComponent implements OnInit, OnDestroy {
309316
.pipe(take(1))
310317
.subscribe((res) => {
311318
this.recentSentences = res.rows.map((r) => r.text);
319+
this.loading = false;
312320
});
313321
}
314322

0 commit comments

Comments
 (0)