mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Limit getMembers() and getSubgroups() to only fetching one object. These lists are only used to find the size of each
(cherry picked from commit 0da7c15f2e
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
787feae631
commit
139446118b
@@ -216,18 +216,28 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the members (epersons embedded value of a group)
|
* Get the members (epersons embedded value of a group)
|
||||||
|
* NOTE: At this time we only grab the *first* member in order to receive the `totalElements` value
|
||||||
|
* needed for our HTML template.
|
||||||
* @param group
|
* @param group
|
||||||
*/
|
*/
|
||||||
getMembers(group: Group): Observable<RemoteData<PaginatedList<EPerson>>> {
|
getMembers(group: Group): Observable<RemoteData<PaginatedList<EPerson>>> {
|
||||||
return this.ePersonDataService.findListByHref(group._links.epersons.href).pipe(getFirstSucceededRemoteData());
|
return this.ePersonDataService.findListByHref(group._links.epersons.href, {
|
||||||
|
currentPage: 1,
|
||||||
|
elementsPerPage: 1,
|
||||||
|
}).pipe(getFirstSucceededRemoteData());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the subgroups (groups embedded value of a group)
|
* Get the subgroups (groups embedded value of a group)
|
||||||
|
* NOTE: At this time we only grab the *first* subgroup in order to receive the `totalElements` value
|
||||||
|
* needed for our HTML template.
|
||||||
* @param group
|
* @param group
|
||||||
*/
|
*/
|
||||||
getSubgroups(group: Group): Observable<RemoteData<PaginatedList<Group>>> {
|
getSubgroups(group: Group): Observable<RemoteData<PaginatedList<Group>>> {
|
||||||
return this.groupService.findListByHref(group._links.subgroups.href).pipe(getFirstSucceededRemoteData());
|
return this.groupService.findListByHref(group._links.subgroups.href, {
|
||||||
|
currentPage: 1,
|
||||||
|
elementsPerPage: 1,
|
||||||
|
}).pipe(getFirstSucceededRemoteData());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user