aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2021-01-13 17:07:14 +0100
committerMartin Stockhammer <martin_s@apache.org>2021-01-13 17:07:14 +0100
commitdebc1d3c2a55646940aff0f51341af70edf7898c (patch)
tree4f284e1736e0cbc9b318deb23637ea2683a651d5
parent80f8684a5d3dba1c11dc0af0cebe385805b3568e (diff)
downloadarchiva-debc1d3c2a55646940aff0f51341af70edf7898c.tar.gz
archiva-debc1d3c2a55646940aff0f51341af70edf7898c.zip
Trying to fix multicast problem
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/security/roles/manage-roles-edit/manage-roles-edit.component.html16
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.html15
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.ts10
3 files changed, 24 insertions, 17 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/security/roles/manage-roles-edit/manage-roles-edit.component.html b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/security/roles/manage-roles-edit/manage-roles-edit.component.html
index cd1e9b0b9..bdbf7da47 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/security/roles/manage-roles-edit/manage-roles-edit.component.html
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/security/roles/manage-roles-edit/manage-roles-edit.component.html
@@ -166,14 +166,14 @@
[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"
@@ -186,11 +186,11 @@
</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>
@@ -205,8 +205,8 @@
[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>
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.html b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.html
index 879ff98bc..06622055e 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.html
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.html
@@ -15,10 +15,17 @@
~ 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>
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.ts b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.ts
index 6239e88d2..1e0c22d45 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.ts
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/shared/paginated-entities/paginated-entities.component.ts
@@ -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) {