UI: debug strategy fixes

This commit is contained in:
mpetrov 2024-12-02 18:48:46 +02:00
parent 8b170f1a34
commit f67d6279dc
2 changed files with 5 additions and 4 deletions

View File

@ -62,9 +62,9 @@ export class DebugSettingsButtonComponent implements ControlValueAccessor {
disabled = false;
isDebugAllActive$ = this.debugSettingsFormGroup.get('allEnabled').valueChanges.pipe(
startWith(this.debugSettingsFormGroup.get('allEnabled').value),
switchMap(value => {
if (value) {
startWith(null),
switchMap(() => {
if (this.allEnabled) {
return of(true);
} else {
return timer(0, SECOND).pipe(
@ -79,7 +79,7 @@ export class DebugSettingsButtonComponent implements ControlValueAccessor {
readonly maxDebugModeDurationMinutes = getCurrentAuthState(this.store).maxDebugModeDurationMinutes;
private propagateChange: (settings: DebugSettings) => void;
private propagateChange: (settings: DebugSettings) => void = () => {};
constructor(private popoverService: TbPopoverService,
private renderer: Renderer2,

View File

@ -121,6 +121,7 @@ export class DebugSettingsPanelComponent extends PageComponent implements OnInit
this.onSettingsApplied.emit({
allEnabled: false,
failuresEnabled: this.onFailuresControl.value,
allEnabledUntil: this.allEnabledUntil,
});
}
}