Skip to content

Commit c9a2ff0

Browse files
authored
Fix: (#86)
- set correct condition for parent loading
1 parent e019a0e commit c9a2ff0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/app/views/detail/session/rest/detail-session-rest.view.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<mat-icon>call_received</mat-icon>
1212
{{ session.name || 'N/A' }}
1313
</a>
14-
<div class="right">
15-
<mat-progress-spinner *ngIf="!sessionParent" style="display:inline-flex !important;" diameter="24" mode="indeterminate"
14+
<div class="right">
15+
<mat-progress-spinner *ngIf="parentLoading && !sessionParent" style="display:inline-flex !important;" diameter="24" mode="indeterminate"
1616
matTooltip="Chargement de l'appel parent" TooltipPosition="below"></mat-progress-spinner>
1717
<button mat-icon-button (click)="navigate($event,'parent')" matTooltip="Détail de l'appel parent"
1818
[hidden]="!sessionParent">

src/app/views/detail/session/rest/detail-session-rest.view.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class DetailSessionRestView implements OnInit, OnDestroy {
2323
completedSession: InstanceRestSession
2424
sessionParent: { id: string, type: string };
2525
isLoading: boolean = false;
26+
parentLoading: boolean =false;
2627
subscriptions: Array<Subscription> = [];
2728
queryBySchema: any[];
2829
env: string;
@@ -42,11 +43,12 @@ export class DetailSessionRestView implements OnInit, OnDestroy {
4243

4344
getSession(id: string) {
4445
this.isLoading = true;
46+
this.parentLoading = true;
4547
this.session = null;
4648
this.completedSession =null;
4749
this.queryBySchema = null;
4850
this.sessionParent=null;
49-
this._traceService.getSessionParent(id).pipe(catchError(() => of(null))).subscribe(d=>this.sessionParent=d)
51+
this._traceService.getSessionParent(id).pipe(catchError(() => of(null)),finalize(()=>(this.parentLoading = false))).subscribe(d=>this.sessionParent=d)
5052
this._traceService.getRestSession(id)
5153
.pipe(
5254
switchMap(s => {

0 commit comments

Comments
 (0)