From 786cd63fa9ffaadc42a2d293cfeb77de5bcff8d4 Mon Sep 17 00:00:00 2001
From: Chris Hines <chris.hines@monash.edu>
Date: Fri, 22 May 2020 22:16:18 +1000
Subject: [PATCH] debugging statements when things get stuck pre-login

---
 src/app/launcher/launcher.component.html | 4 ++++
 src/app/launcher/launcher.component.ts   | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/src/app/launcher/launcher.component.html b/src/app/launcher/launcher.component.html
index e382969..d71b9a8 100644
--- a/src/app/launcher/launcher.component.html
+++ b/src/app/launcher/launcher.component.html
@@ -9,6 +9,7 @@
                 </mat-list-item>
             </mat-list>
             <div style="border-style: solid none none none ; border-width: 1px; border-color: var(--panel-border-color); box-sizing: border-box">
+            <div *ngIf="computeSitesService.appidentities | async as obs; else loading">
             <mat-accordion style="width: 100%" [displayMode]="'flat'">
                 <div *ngFor="let id of (computeSitesService.appidentities | async)" style="border-style: none none solid none; border-width: 1px; border-color: var(--panel-border-color) ">
                     <!--<mat-expansion-panel (afterExpand)="selectId(id)" (closed)="selectId(id)" style="width: 100%">-->
@@ -42,12 +43,14 @@
                     <!--<div style="width: 100%; border-bottom: 1px solid var(--panel-border-color);"></div>-->
                 </div>
             </mat-accordion>
+            </div><ng-template #loading>Loading...</ng-template>
             </div>
             </nav>
         </div>
         <div fxFlex></div>
     </mat-sidenav>
     <mat-sidenav-content>
+            <div *ngIf="computeSitesService.appidentities | async as obs; else loading">
         <div fxLayout="column" fxLayoutAlign="start none" style="height: 100%">
             <div *ngIf="!(settingsService.useMenu$ | async)">
                 <mat-divider inset=true></mat-divider>
@@ -81,6 +84,7 @@
             
 
         </div>
+        </div><ng-template #loading>Determining which sites you are logged into already ...</ng-template>
     </mat-sidenav-content>
 </mat-sidenav-container>
 </div>
diff --git a/src/app/launcher/launcher.component.ts b/src/app/launcher/launcher.component.ts
index eebd17f..3bc03cd 100644
--- a/src/app/launcher/launcher.component.ts
+++ b/src/app/launcher/launcher.component.ts
@@ -73,6 +73,9 @@ export class LauncherComponent implements OnInit {
     this.app$ = new BehaviorSubject<Strudelapp>(null);
     this.identity$ = new BehaviorSubject<Identity>(null);
     this.identity = null;
+    this.computeSitesService.identities.subscribe((o) => console.log('identities change',o,Date()));
+    this.computeSitesService.appidentities.subscribe((o) => console.log('appidentities change',o,Date()));
+    this.authService.sshAuthzServers.subscribe(o => console.log('authzservers change',o,Date()));
     //this.quotas = new BehaviorSubject<any[]>([]);
   }
 
-- 
GitLab