diff --git a/src/app/browser-window.service.ts b/src/app/browser-window.service.ts index 157c46e27bb38c2b060a1029560a712d581c9cfc..6c9dbe0d8b9bbebc74a589d041f9ebfd87af4e73 100644 --- a/src/app/browser-window.service.ts +++ b/src/app/browser-window.service.ts @@ -16,6 +16,7 @@ import { ModaldialogComponent } from './modaldialog/modaldialog.component'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material'; import {NotificationsService } from './notifications.service'; import { HttpClientModule, HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http'; +import { SettingsService } from './settings.service'; import { environment } from '../environments/environment'; @@ -32,7 +33,8 @@ export class BrowserWindowService { constructor(private backendSelectionService: BackendSelectionService, public dialog: MatDialog, private notifications: NotificationsService, - private http: HttpClient) { + private http: HttpClient, + private settingsService: SettingsService) { this.backendSelectionService.apiserver.subscribe( (value) => { if (value != null) {this.twsproxy = value.tws ; this.Base = value.tes }}); this.authdone$ = new Subject<boolean>(); this.openapps = []; @@ -106,6 +108,7 @@ export class BrowserWindowService { public logUsage() { var app: any; + if (this.settingsService.logging) { this.openapps.forEach( (app,index) => { if (!app.window.closed) { if (app.job.state == 'RUNNING') { @@ -115,6 +118,7 @@ export class BrowserWindowService { } } }) + } }