diff --git a/src/app/backend-selection.service.ts b/src/app/backend-selection.service.ts index 224df910147e7cfa19135013844a5f437a5d972e..4a75d8f2b6824df5683ab67bfb5d92e6e8833fcc 100644 --- a/src/app/backend-selection.service.ts +++ b/src/app/backend-selection.service.ts @@ -83,7 +83,7 @@ export class BackendSelectionService { servers = this.apiservers.value; for (let server of servers) { combineLatest([of(performance.now()), - this.http.get<string>(server.tes+'/sshagent',options).pipe( + this.http.get<string>(server.tes+'/ping',options).pipe( timeout(timeouts))]) .subscribe((ok) => {server.ping = (performance.now() - <number>(ok[0]))}, (err) => {server.ping = null}); diff --git a/src/app/notifications.service.ts b/src/app/notifications.service.ts index 58496d7f67aa653958340eb15142aa2a9fb3d5b8..fe2a805301ee47e5f8a213e6347ea02ca75e48f0 100644 --- a/src/app/notifications.service.ts +++ b/src/app/notifications.service.ts @@ -17,6 +17,10 @@ export class NotificationsService { } notify(msg: any) { + if (msg === null || msg === undefined) { + this.msg.next(""); + return + } if (msg.hasOwnProperty('error')) { this.notify(msg.error); return; diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html index 18a50fabf71397ed8e11d8de4e07b3478aaac471..564fe90c396d41390edc9cf7c430e32a8a595cc1 100644 --- a/src/app/settings/settings.component.html +++ b/src/app/settings/settings.component.html @@ -28,7 +28,7 @@ <mat-form-field style="width: 100%"> <mat-label>API Server</mat-label> <mat-select [ngModel]="selectedApiServer" (selectionChange)="backendSelectionService.setApiServer($event.value)"> - <mat-option *ngFor="let apis of backendSelectionService.apiservers|async" [value]="apis" [disabled] ="apis.ping === undefined"> + <mat-option *ngFor="let apis of backendSelectionService.apiservers|async" [value]="apis" [disabled] ="apis.ping === undefined || apis.ping === null"> {{ apis.name }} <span *ngIf="apis.ping !== undefined">(ping: {{ apis.ping }} ms)</span> </mat-option> </mat-select> diff --git a/src/app/tes.service.ts b/src/app/tes.service.ts index 5d220e5bf075de44e39e7f9f92123ef5bd51937f..e4052faa5236413c976c879c0adf92596e16ad1e 100644 --- a/src/app/tes.service.ts +++ b/src/app/tes.service.ts @@ -359,10 +359,13 @@ private handleError(error: HttpErrorResponse) { if (error.error instanceof ErrorEvent) { this.notifications.notify("A networking error occured.") return - } else { - this.notifications.notify("Your login appears to have expired. Please login again"); - this.authorisationService.updateAgentContents().subscribe((v) => {return}); + } + if (error.hasOwnProperty("status") && error.status == 500) { + this.notifications.notify(error); + return } + this.notifications.notify("Your login appears to have expired. Please login again"); + this.authorisationService.updateAgentContents().subscribe((v) => {return}); } diff --git a/src/assets/config/computesites.json b/src/assets/config/computesites.json index 17f7a4f9b7a73b9cf0815f014760ec24c01d7f25..a2d7b84a044c03bf721a25a2cac06939933fb2b7 100644 --- a/src/assets/config/computesites.json +++ b/src/assets/config/computesites.json @@ -1,12 +1,12 @@ [ { - "url": "https://strudel2-api-dev.cloud.cvl.org.au/m3/", + "url": "https://beta-api.cloud.cvl.org.au/m3/", "name": "M3", "host": "m3-login2.massive.org.au", "dtn": "m3-dtn1.massive.org.au", "cafingerprint": "RSA SHA256:cmDxHrZQSPlBMUUcI/BWmruXho1XOzfXPDHSqVTwV2I", "appCatalog": [], - "appCatalogCmd": "cat /usr/local/sv2/dev/apps.json", + "appCatalogCmd": "/usr/local/strudel2_cluster/latest/bin/getapps", "cancelcmd": "/usr/local/sv2/dev/scripts/bin/s2cancel {jobid}", "statcmd": "/usr/local/sv2/dev/scripts/bin/s2stat", "userhealth": "/usr/local/userhealth/0.0.2/bin/uijson",