]> source.dussan.org Git - archiva.git/commitdiff
Trying to fix multicast problem
authorMartin Stockhammer <martin_s@apache.org>
Wed, 13 Jan 2021 16:07:14 +0000 (17:07 +0100)
committerMartin Stockhammer <martin_s@apache.org>
Wed, 13 Jan 2021 16:07:14 +0000 (17:07 +0100)
archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/security/roles/manage-roles-edit/manage-roles-edit.component.html
archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.html
archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.ts

index cd1e9b0b90084266c0c5ec07b66f88b8d48dc2ae..bdbf7da479bfe3f38aa92c96443a41c9bcbfe86a 100644 (file)
                                     [id]="'userParentSection'"
                                     #userParentSection>
 
-                <ng-container *ngIf="userParentSection.items$ |async as itemLoader">
-                    <ng-template [ngIf]="itemLoader.loading">
+                <ng-container *ngIf="userParentSection.items$ |async as userParentItemLoader">
+                    <ng-template [ngIf]="userParentItemLoader.loading">
                         <div class="spinner-border text-primary" role="status">
                             <span class="sr-only">Loading...</span>
                         </div>
                     </ng-template>
                 </ng-container>
-                <ng-container *ngIf="userParentSection.items$ |stripLoading|async as userItem">
+                <ng-container *ngIf="userParentSection.items$ |stripLoading|async as parentUserItem">
                     <table class="table table-striped table-bordered">
                         <thead class="thead-light">
                         <tr sorted [sortFieldEmitter]="userParentSection.sortFieldChange"
                         </tr>
                         </thead>
                         <tbody>
-                        <tr *ngFor="let user  of userItem.data">
+                        <tr *ngFor="let parentUser  of parentUserItem.data">
                             <td><span data-toggle="tooltip" placement="left"
-                                      ngbTooltip="{{user.id}}">{{user.user_id}}</span>
+                                      ngbTooltip="{{parentUser.id}}">{{parentUser.user_id}}</span>
                             </td>
-                            <td>{{user.full_name}}</td>
+                            <td>{{parentUser.full_name}}</td>
                         </tr>
                         </tbody>
                     </table>
                                     [displayControlsIfSinglePage]="false"
                                     #userSection>
 
-                <ng-container *ngIf="userSection.items$ |async as itemLoader">
-                    <ng-template [ngIf]="itemLoader.loading">
+                <ng-container *ngIf="userSection.items$ |async as userItemLoader">
+                    <ng-template [ngIf]="userItemLoader.loading">
                         <div class="spinner-border text-primary" role="status">
                             <span class="sr-only">Loading...</span>
                         </div>
index 879ff98bce695f05cac11726a87fef86014223d8..06622055e4976b4f1ed794edafaaf8c1ddd7ae5d 100644 (file)
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
+<!--
+<ng-template [ngIf]="((total$|async)>0 || displayIfEmpty)" [ngIfElse]="noContent" >
+-->
+    <ng-template [ngIf]="true" [ngIfElse]="noContent" >
+
 
-<ng-template [ngIf]="(displayIfEmpty || (total$|async)>0)" [ngIfElse]="noContent" >
-<form class="mt-3 mb-3">
-    <div class="form-row align-items-center" *ngIf="displayControlsIfSinglePage||(multiplePages$|async)">
+    <form class="mt-3 mb-3">
+        <!--
+        <div class="form-row align-items-center" *ngIf="(multiplePages$|async)||displayControlsIfSinglePage">
+        -->
+    <div class="form-row align-items-center" *ngIf="(multiplePages$|async)==true">
         <div class="col-lg-4 col-md-2 col-sm-1">
             <label class="sr-only" for="searchQuery">{{'search.label' |translate}}</label>
             <input type="text" class="form-control" id="searchQuery" placeholder="{{'search.input'|translate}}" #searchTerm
@@ -34,7 +41,7 @@
 
 <ng-content></ng-content>
 
-<ngb-pagination *ngIf="displayControlsIfSinglePage||(multiplePages$|async)"
+<ngb-pagination *ngIf="(multiplePages$|async)==true"
                 [collectionSize]="total$|async" [pageSize]="pageSize" [maxSize]="pagination.maxSize" [rotate]="pagination.rotate"
                 [boundaryLinks]="pagination.boundaryLinks" [ellipses]="pagination.ellipses"
                 [(page)]="page" (pageChange)="changePage($event)" aria-label="Pagination"></ngb-pagination>
index 6239e88d2c6f87fd891db6e8d56e2fde2857a0bb..1e0c22d4522a2f9864ef373654b3e21d0216e247 100644 (file)
@@ -27,7 +27,7 @@ import {
     pluck,
     refCount,
     startWith,
-    switchMap
+    switchMap, tap
 } from "rxjs/operators";
 import {EntityService} from "@app/model/entity-service";
 import {FieldToggle} from "@app/model/field-toggle";
@@ -187,11 +187,11 @@ export class PaginatedEntitiesComponent<T> implements OnInit, FieldToggle, After
             multicast(new Subject()),
             refCount()
             );
-        this.total$ = source.pipe(filter(val=>val.hasValue()),map(val=>val.value),
-            pluck('pagination', 'total_count'));
-        this.multiplePages$ = source.pipe(filter(val => val.hasValue()),
+        this.total$ = source.pipe(tap((el)=>console.log("Total pipe "+this.id+": "+typeof(el)+" - "+JSON.stringify(el))),filter(val=>val.hasValue()),map(val=>val.value),
+            pluck('pagination', 'total_count'),tap((el)=>console.log("Total end "+this.id+" - "+el)));
+        this.multiplePages$ = source.pipe(tap((el)=>console.log("Multipage pipe "+this.id+": "+typeof(el)+" - "+JSON.stringify(el))),filter(val => val.hasValue()),
             map(val => val.value.pagination.total_count > val.value.pagination.limit));
-        this.items$ = source;
+        this.items$ = source.pipe(tap((el)=>console.log("Item pipe "+this.id+": "+typeof(el)+" - "+JSON.stringify(el))));
     }
 
     search(terms: string) {