diff --git a/src/app/launch-dialog/launch-dialog.component.ts b/src/app/launch-dialog/launch-dialog.component.ts index f186c31d25da12e3fb28a2211b50f7bf78383948..56c09ca0def26b9154803e352f919ee50cf2a8b3 100644 --- a/src/app/launch-dialog/launch-dialog.component.ts +++ b/src/app/launch-dialog/launch-dialog.component.ts @@ -43,6 +43,7 @@ export class LaunchDialogComponent implements OnInit { configtoggle: boolean; configwindow: any; public readyToLaunch: boolean; + private openWindowSub: Subscription; //constructor( public dialogRef: MatDialogRef<LaunchDialogComponent>, constructor( @@ -59,7 +60,6 @@ export class LaunchDialogComponent implements OnInit { this.height=0; this.submitcmd.subscribe(() => this.canILaunch()); this.appData.subscribe(() => this.canILaunch()); - this.tesService.openWindow$.subscribe((v) => { this.browserWindowService.openAppWindow(v.job,v.url,v.usebasicauth,v.action,v.appinst)}) this.browserWindowService.cancelJob$.subscribe((v) => this.tesService.cancel(v)) } @@ -69,6 +69,7 @@ export class LaunchDialogComponent implements OnInit { this.setFocus = false; this.updateURLs(); this.clearInfo(); + this.openWindowSub = this.tesService.openWindow$.subscribe((v) => { this.browserWindowService.openAppWindow(v.job,v.url,v.usebasicauth,v.action,v.appinst)}) this.subscriptions.push(this.appSubject.subscribe(() => { this.app = this.appSubject.value; this.updateURLs() ; this.clearInfo()})); } @@ -109,6 +110,7 @@ export class LaunchDialogComponent implements OnInit { for (let s of this.subscriptions) { s.unsubscribe(); } + this.openWindowSub.unsubscribe(); }