Commit 65658df9 authored by Chris Hines's avatar Chris Hines
Browse files

weird hanging on dev server, trying to debug

parent e13fd70f
Pipeline #7536 passed with stages
in 3 minutes and 1 second
...@@ -168,21 +168,26 @@ export class AuthorisationService { ...@@ -168,21 +168,26 @@ export class AuthorisationService {
public getCert() { public getCert() {
var token: AuthToken; var token: AuthToken;
token = this.token.value; token = this.token.value;
console.log('entered getCert');
if (token === null || token === undefined || token.token === undefined || token.token === '' || token.token === null) { if (token === null || token === undefined || token.token === undefined || token.token === '' || token.token === null) {
this.token.pipe(skip(1),take(1)).subscribe(() => this.getCert()) console.log('getCert token not defined, setting callback');
this.token.pipe(skip(1),take(1)).subscribe(() => this.getCert());
return return
} }
if (this.backendSelectionService.apiserver.value === null || this.backendSelectionService.apiserver.value === undefined) { if (this.backendSelectionService.apiserver.value === null || this.backendSelectionService.apiserver.value === undefined) {
this.backendSelectionService.apiserver.pipe(skip(1),take(1)).subscribe(() => this.getCert()) console.log('getCert api server not defined, setting callback');
this.backendSelectionService.apiserver.pipe(skip(1),take(1)).subscribe(() => this.getCert());
return return
} }
console.log('generating ssh key');
let starttime = new Date(); let starttime = new Date();
let newkeypair = keypair(); let newkeypair = keypair();
let publicKey = forge.pki.publicKeyFromPem(newkeypair.public); let publicKey = forge.pki.publicKeyFromPem(newkeypair.public);
let sshpub = forge.ssh.publicKeyToOpenSSH(publicKey, 'sv2@monash.edu'); let sshpub = forge.ssh.publicKeyToOpenSSH(publicKey, 'sv2@monash.edu');
let endtime = new Date(); let endtime = new Date();
console.log('created a private key, getting it signed');
let headers = new HttpHeaders(); let headers = new HttpHeaders();
let options = { headers: headers, withCredentials: true}; let options = { headers: headers, withCredentials: true};
......
...@@ -50,7 +50,7 @@ export class BackendSelectionService { ...@@ -50,7 +50,7 @@ export class BackendSelectionService {
this.saveLastApiServer(this.apiserver.value) this.saveLastApiServer(this.apiserver.value)
} }
storeLocalAPIServers(apiservers) { /* storeLocalAPIServers(apiservers) {
localStorage.setItem('localAPIServers',JSON.stringify(apiservers)); localStorage.setItem('localAPIServers',JSON.stringify(apiservers));
this.getAPIServers(); this.getAPIServers();
} }
...@@ -58,7 +58,7 @@ export class BackendSelectionService { ...@@ -58,7 +58,7 @@ export class BackendSelectionService {
removeLocalAPIServer() { removeLocalAPIServer() {
localStorage.removeItem('localAPIServers'); localStorage.removeItem('localAPIServers');
this.getAPIServers(); this.getAPIServers();
} }*/
getAPIServers() { getAPIServers() {
console.log('retrieving api servers'); console.log('retrieving api servers');
......
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