From c93a52ef3ddd42ae986187c4e1cd03d53955f2aa Mon Sep 17 00:00:00 2001 From: Chris Hines <chris.hines@monash.edu> Date: Tue, 16 Jun 2020 10:15:12 +1000 Subject: [PATCH] refresh jobs as soon as we are logged in --- src/app/launcher/launcher.component.ts | 3 +++ src/app/tes.service.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/launcher/launcher.component.ts b/src/app/launcher/launcher.component.ts index 3bc03cd..f8c8c25 100644 --- a/src/app/launcher/launcher.component.ts +++ b/src/app/launcher/launcher.component.ts @@ -23,6 +23,7 @@ import { SshAuthzServer } from '../identity'; import { ComputesitesService } from '../computesites.service'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { SettingsService} from '../settings.service'; +import { JobsService} from '../jobs.service'; @@ -68,6 +69,7 @@ export class LauncherComponent implements OnInit { private route: ActivatedRoute, private strudelappsService: StrudelappsService, public settingsService: SettingsService, + private jobsService: JobsService, ) { this.app$ = new BehaviorSubject<Strudelapp>(null); @@ -170,6 +172,7 @@ export class LauncherComponent implements OnInit { this.subscriptions.push(this.authService.sshAuthzServers.subscribe(o => {this.updateSshAuthZServers(o)})); this.subscriptions.push(this.computeSitesService.identities.subscribe(o => this.navLogin(o))); this.subscriptions.push(this.computeSitesService.appidentities.subscribe(o => this.getHealth(o))); + this.subscriptions.push(this.identity$.subscribe(o => this.jobsService.setId(o))); } diff --git a/src/app/tes.service.ts b/src/app/tes.service.ts index e4052fa..0445842 100644 --- a/src/app/tes.service.ts +++ b/src/app/tes.service.ts @@ -90,7 +90,7 @@ getUserHealth(identity: Identity) { params.set('host',JSON.stringify(identity.site.host)); params.set('username',JSON.stringify(identity.username)); - this.updateUserHealthSub = this.http.get<Health[]>(this.Base+'/stat'+'?'+params.toString(),options) + this.updateUserHealthSub = this.runCommand(identity,identity.site.userhealth) .pipe(takeUntil(this.cancelRequests$)) .subscribe(resp => this.addUserHealth(identity,resp), error => this.getUserHealthError(error,identity)); } -- GitLab