diff --git a/src/app/pages/reports-dashboard/components/reports-global-controls/reports-global-controls.component.ts b/src/app/pages/reports-dashboard/components/reports-global-controls/reports-global-controls.component.ts index 8245e590962..7426272140b 100644 --- a/src/app/pages/reports-dashboard/components/reports-global-controls/reports-global-controls.component.ts +++ b/src/app/pages/reports-dashboard/components/reports-global-controls/reports-global-controls.component.ts @@ -8,7 +8,7 @@ import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { Store } from '@ngrx/store'; -import { take } from 'rxjs'; +import { debounceTime, take } from 'rxjs'; import { NetdataDialogComponent, } from 'app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component'; @@ -80,7 +80,7 @@ export class ReportsGlobalControlsComponent implements OnInit { if (this.activeTab?.value !== ReportType.Disk) { return; } - this.form.valueChanges.pipe(untilDestroyed(this)).subscribe((values) => { + this.form.valueChanges.pipe(debounceTime(300), untilDestroyed(this)).subscribe((values) => { this.diskOptionsChanged.emit({ devices: values.devices, metrics: values.metrics, diff --git a/src/app/pages/reports-dashboard/reports-dashboard.component.ts b/src/app/pages/reports-dashboard/reports-dashboard.component.ts index 533e08b2958..8082a1c5a8a 100644 --- a/src/app/pages/reports-dashboard/reports-dashboard.component.ts +++ b/src/app/pages/reports-dashboard/reports-dashboard.component.ts @@ -4,7 +4,6 @@ import { ChangeDetectorRef, Component, ElementRef, - Inject, OnDestroy, OnInit, ViewChild, @@ -13,7 +12,6 @@ import { ActivatedRoute } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { ReportingGraphName } from 'app/enums/reporting.enum'; import { stringToTitleCase } from 'app/helpers/string-to-title-case'; -import { WINDOW } from 'app/helpers/window.helper'; import { Option } from 'app/interfaces/option.interface'; import { ReportTab, ReportType } from 'app/pages/reports-dashboard/interfaces/report-tab.interface'; import { Report } from 'app/pages/reports-dashboard/interfaces/report.interface'; @@ -48,7 +46,6 @@ export class ReportsDashboardComponent implements OnInit, OnDestroy { private layoutService: LayoutService, private reportsService: ReportsService, private cdr: ChangeDetectorRef, - @Inject(WINDOW) private window: Window, ) {} ngOnInit(): void {