diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7a1f4d72b..fb6a0084e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -47,7 +47,7 @@ import { DonutChartComponent } from './donut-chart/donut-chart.component'; cookieName: 'CSRF-Token-' + deviceID(), }), environment.production ? - [] : HttpClientInMemoryWebApiModule.forRoot(InMemoryConfigDataService), + [] : HttpClientInMemoryWebApiModule.forRoot(InMemoryConfigDataService, { delay: 200 }), MatCardModule, FlexLayoutModule ], diff --git a/src/app/donut-chart/donut-chart.component.ts b/src/app/donut-chart/donut-chart.component.ts index 8c6eeb2c9..ba70adb24 100644 --- a/src/app/donut-chart/donut-chart.component.ts +++ b/src/app/donut-chart/donut-chart.component.ts @@ -19,7 +19,6 @@ export class DonutChartComponent implements OnInit { } ngAfterViewInit(): void { - console.log("elementID?", this.elementID) this.canvas = document.getElementById(this.elementID); this.ctx = this.canvas.getContext('2d'); const myChart = new Chart(this.ctx, { diff --git a/src/app/in-memory-config-data.service.ts b/src/app/in-memory-config-data.service.ts index 5174693c6..ed3966c74 100644 --- a/src/app/in-memory-config-data.service.ts +++ b/src/app/in-memory-config-data.service.ts @@ -109,7 +109,6 @@ export class InMemoryConfigDataService { "ignoredDevices": [], "ignoredFolders": [] } - console.log("in mem?!?!?", config) return { config }; } constructor() { } diff --git a/src/app/status-list/status-list.component.ts b/src/app/status-list/status-list.component.ts index 6fc011497..39cd5ee1b 100644 --- a/src/app/status-list/status-list.component.ts +++ b/src/app/status-list/status-list.component.ts @@ -17,7 +17,6 @@ export class StatusListComponent implements OnInit { } onToggle(s: Status) { - console.log("holy moly", s); this.currentStatus = s; } } diff --git a/src/app/system-config.service.ts b/src/app/system-config.service.ts index dea7bd963..98bcd4175 100644 --- a/src/app/system-config.service.ts +++ b/src/app/system-config.service.ts @@ -24,7 +24,7 @@ export class SystemConfigService { private systemConfigUrl = environment.production ? apiURL + 'rest/system/config' : 'api/config'; private httpOptions; - private checkInterval: number = 500; + private checkInterval: number = 100; constructor(private http: HttpClient, private cookieService: CookieService) { this.httpOptions = { headers: new HttpHeaders(this.cookieService.getCSRFHeader()) }; @@ -53,9 +53,10 @@ export class SystemConfigService { } else { // create timer to keep checking for folders let t = setInterval(() => { - if (check(this.folders)) + if (this.folders) { clearInterval(t); - observer.next(this.folders); + observer.next(this.folders); + } }, this.checkInterval); } }); @@ -68,7 +69,7 @@ export class SystemConfigService { observer.next(this.devices); } else { let t = setInterval(() => { - if (check(this.devices)) { + if (this.devices) { clearInterval(t); observer.next(this.devices); } @@ -77,11 +78,4 @@ export class SystemConfigService { }); return deviceObserverable; } -} - -const check = (target: any): Boolean => { - if (target) { - return true; - } - return false; } \ No newline at end of file