Skip to content
Snippets Groups Projects
Commit f1f88685 authored by Chris Hines's avatar Chris Hines
Browse files

more debug info

parent f1d360ff
No related branches found
No related tags found
4 merge requests!106if stat fails, display the error instead of immediately refreshing...,!99Dev,!61Test,!59Dev
Pipeline #10416 passed
......@@ -29,11 +29,12 @@ export class BackendSelectionService {
var obs: Observable<any>[] = [];
let headers = new HttpHeaders();
let options = { headers: headers, withCredentials: false};
console.log('entering testAPIServers');
for (let server of servers) {
//obs.push( this.http.get(s.tes+'/sshagent',options).pipe(map((r) => {return {'server':s,'check':r}})));
obs.push( this.http.get<string>(server.tes+'/sshagent',options).pipe(
timeout(2000),
catchError(e=> {return of(null)}),
catchError(e=> {console.error('testing api server',server); console.error(e); return of(null)}),
map((v) => {return {'server':server,'query':v}}),
));
}
......@@ -97,6 +98,7 @@ export class BackendSelectionService {
let options = { headers: headers, withCredentials: false};
this.http.get<APIServer[]>('./assets/config/apiservers.json',options).pipe(
switchMap((v) => this.testApiServers(v)),
tap((v) => console.log('testapiservers observable fired',v)),
map((list, idx) => (<any[]>list)
.filter(function (v) { return v.query != null})
.map(function (v) {return v.server})) // Note the two maps are not the same one is an rxjs observable map one is a list map
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment