diff --git a/src/app/tes.service.ts b/src/app/tes.service.ts index 08db0e00b30e19e05378fbb49b4c4a0b173dbef4..3466aefc240919b392d9fd4d321e2c8344aa2769 100644 --- a/src/app/tes.service.ts +++ b/src/app/tes.service.ts @@ -33,7 +33,7 @@ Its also responsible for querying a compute site for running jobs */ }) export class TesService { public Base=environment.tesurl; -public twsproxy = environment.twsurl; +private twsproxy = environment.twsurl; // public Base='http://localhost:5000'; public statusMsg: BehaviorSubject<any>; public jobs: any[]; @@ -60,7 +60,7 @@ public apiservers: BehaviorSubject<APIServer[]>; this.joblist = new BehaviorSubject<Job[]>([]); this.apiserver = new BehaviorSubject<APIServer>(undefined); this.apiservers = new BehaviorSubject<APIServer[]>([]); - this.apiserver.subscribe((r)=>this.logApiServerChange(r)); + this.apiserver.subscribe((r)=>this.onApiServerChange(r)); this.timerSubscription = null; this.appwindowWatcher = null; @@ -73,9 +73,9 @@ public setStatusMsg(statusMsg: BehaviorSubject<any>) { this.statusMsg = statusMsg; } -private logApiServerChange(r) { - console.log('api server was updated'); - console.log(this.apiserver.value); +private onApiServerChange(r) { + this.Base = this.apiserver.value.tes; + this.twsproxy = this.apiserver.value.tws; } setApiServer(server: APIServer) { @@ -287,7 +287,6 @@ private logApiServerChange(r) { } public openAppWindow(url: any) { - console.log('in open window url is',url,this.twsproxy); let windowloc = url.replace(/\{twsproxy\}/g,this.twsproxy); console.log('window loc is ',windowloc); // let windowloc = this.router.config