Commit d176913a authored by Chris Hines's avatar Chris Hines
Browse files

still facing redirecti issue

parent 255d612f
Pipeline #7545 passed with stages
in 2 minutes and 58 seconds
......@@ -225,9 +225,11 @@ public getKeys(id?: Identity) {
window.open(sshauthzservice.logout);
}
let path=sessionStorage.getItem('path');
//skip1 because loggedInAuthZ is a behaviour subject and we don't want the current value but the value
//after updateAgentcontents has run
this.loggedInAuthZ.pipe(skip(1),take(1)).subscribe( () => {this.readyToNavigate.next([true,path])});
this.updateAgentContents();
// only navigate once the agent contents has been refreshed
this.loggedInAuthZ.pipe(take(1)).subscribe( () => {this.readyToNavigate.next([true,path])});
}
public querySshAgentError(error: any) {
......
......@@ -156,6 +156,8 @@ export class ComputesitesService {
var appidentities: Identity[] = [];
var ftidentities: Identity[] = [];
// If the agent contents is set to null we are probably still updating it
console.log('updating app identities');
console.log(resp);
if (resp == null) {
return
}
......
......@@ -67,7 +67,7 @@ export class LauncherComponent implements OnInit {
) {
this.subscriptions = [];
this.subscriptions.push(this.authService.sshAuthzServers.subscribe(o => {this.updateSshAuthZServers(o)}));
this.subscriptions.push(this.computeSitesService.appidentities.subscribe(o => this.navLogin(o)));
this.subscriptions.push(this.authService.loggedInAuthZ.subscribe(o => this.navLogin(o)));
this.subscriptions.push(this.computeSitesService.appidentities.subscribe(o => this.getHealth(o)));
this.appSubject = new BehaviorSubject<Strudelapp>(null);
this.identitySubject = new BehaviorSubject<Identity>(null);
......@@ -129,10 +129,14 @@ export class LauncherComponent implements OnInit {
}
navLogin(o) {
console.log('in navLogin');
if (o == null) {
console.log('not redireting null');
return
}
if (o.length == 0) {
console.log('redireting length == 0');
this.router.navigate(['/login']);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment