Skip to content

Commit 87a7baa

Browse files
committed
Merge remote-tracking branch 'origin/main' into PR-1548-fix-group-page-lists
2 parents 0f6fdce + a2f8a5c commit 87a7baa

266 files changed

Lines changed: 6379 additions & 4019 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/config.example.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,10 @@ mediaViewer:
258258
info:
259259
enableEndUserAgreement: true
260260
enablePrivacyStatement: true
261+
# Home Page
262+
homePage:
263+
recentSubmissions:
264+
# The number of item showing in recent submission components
265+
pageSize: 5
266+
# Sort record of recent submission
267+
sortField: 'dc.date.accessioned'

cypress/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
screenshots/
22
videos/
3+
downloads/

scripts/test-rest.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ console.log(`...Testing connection to REST API at ${restUrl}...\n`);
2222
if (appConfig.rest.ssl) {
2323
const req = https.request(restUrl, (res) => {
2424
console.log(`RESPONSE: ${res.statusCode} ${res.statusMessage} \n`);
25-
res.on('data', (data) => {
25+
// We will keep reading data until the 'end' event fires.
26+
// This ensures we don't just read the first chunk.
27+
let data = '';
28+
res.on('data', (chunk) => {
29+
data += chunk;
30+
});
31+
res.on('end', () => {
2632
checkJSONResponse(data);
2733
});
2834
});
@@ -35,7 +41,13 @@ if (appConfig.rest.ssl) {
3541
} else {
3642
const req = http.request(restUrl, (res) => {
3743
console.log(`RESPONSE: ${res.statusCode} ${res.statusMessage} \n`);
38-
res.on('data', (data) => {
44+
// We will keep reading data until the 'end' event fires.
45+
// This ensures we don't just read the first chunk.
46+
let data = '';
47+
res.on('data', (chunk) => {
48+
data += chunk;
49+
});
50+
res.on('end', () => {
3951
checkJSONResponse(data);
4052
});
4153
});

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ describe('EPersonFormComponent', () => {
177177

178178
});
179179
groupsDataService = jasmine.createSpyObj('groupsDataService', {
180-
findAllByHref: createSuccessfulRemoteDataObject$(createPaginatedList([])),
180+
findListByHref: createSuccessfulRemoteDataObject$(createPaginatedList([])),
181181
getGroupRegistryRouterLink: ''
182182
});
183183

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
265265
this.formGroup = this.formBuilderService.createFormGroup(this.formModel);
266266
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
267267
if (eperson != null) {
268-
this.groups = this.groupsDataService.findAllByHref(eperson._links.groups.href, {
268+
this.groups = this.groupsDataService.findListByHref(eperson._links.groups.href, {
269269
currentPage: 1,
270270
elementsPerPage: this.config.pageSize
271271
});
@@ -297,7 +297,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
297297
}),
298298
switchMap(([eperson, findListOptions]) => {
299299
if (eperson != null) {
300-
return this.groupsDataService.findAllByHref(eperson._links.groups.href, findListOptions, true, true, followLink('object'));
300+
return this.groupsDataService.findListByHref(eperson._links.groups.href, findListOptions, true, true, followLink('object'));
301301
}
302302
return observableOf(undefined);
303303
})
@@ -554,7 +554,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
554554
*/
555555
private updateGroups(options) {
556556
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
557-
this.groups = this.groupsDataService.findAllByHref(eperson._links.groups.href, options);
557+
this.groups = this.groupsDataService.findListByHref(eperson._links.groups.href, options);
558558
}));
559559
}
560560
}

src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('MembersListComponent', () => {
5353
activeGroup: activeGroup,
5454
epersonMembers: epersonMembers,
5555
subgroupMembers: subgroupMembers,
56-
findAllByHref(href: string): Observable<RemoteData<PaginatedList<EPerson>>> {
56+
findListByHref(href: string): Observable<RemoteData<PaginatedList<EPerson>>> {
5757
return createSuccessfulRemoteDataObject$(buildPaginatedList<EPerson>(new PageInfo(), groupsDataServiceStub.getEPersonMembers()));
5858
},
5959
searchByScope(scope: string, query: string): Observable<RemoteData<PaginatedList<EPerson>>> {

src/app/access-control/group-registry/group-form/members-list/members-list.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class MembersListComponent implements OnInit, OnDestroy {
130130
this.subs.set(SubKey.MembersDTO,
131131
this.paginationService.getCurrentPagination(this.config.id, this.config).pipe(
132132
switchMap((currentPagination) => {
133-
return this.ePersonDataService.findAllByHref(this.groupBeingEdited._links.epersons.href, {
133+
return this.ePersonDataService.findListByHref(this.groupBeingEdited._links.epersons.href, {
134134
currentPage: currentPagination.currentPage,
135135
elementsPerPage: currentPagination.pageSize
136136
}
@@ -172,7 +172,7 @@ export class MembersListComponent implements OnInit, OnDestroy {
172172
return this.groupDataService.getActiveGroup().pipe(take(1),
173173
mergeMap((group: Group) => {
174174
if (group != null) {
175-
return this.ePersonDataService.findAllByHref(group._links.epersons.href, {
175+
return this.ePersonDataService.findListByHref(group._links.epersons.href, {
176176
currentPage: 1,
177177
elementsPerPage: 9999
178178
})

src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe('SubgroupsListComponent', () => {
6565
getSubgroups(): Group {
6666
return this.activeGroup;
6767
},
68-
findAllByHref(href: string): Observable<RemoteData<PaginatedList<Group>>> {
68+
findListByHref(href: string): Observable<RemoteData<PaginatedList<Group>>> {
6969
return this.subgroups$.pipe(
7070
map((currentGroups: Group[]) => {
7171
return createSuccessfulRemoteDataObject(buildPaginatedList<Group>(new PageInfo(), currentGroups));

src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
115115
this.subs.set(
116116
SubKey.Members,
117117
this.paginationService.getCurrentPagination(this.config.id, this.config).pipe(
118-
switchMap((config) => this.groupDataService.findAllByHref(this.groupBeingEdited._links.subgroups.href, {
118+
switchMap((config) => this.groupDataService.findListByHref(this.groupBeingEdited._links.subgroups.href, {
119119
currentPage: config.currentPage,
120120
elementsPerPage: config.pageSize
121121
},
@@ -139,7 +139,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
139139
if (activeGroup.uuid === possibleSubgroup.uuid) {
140140
return observableOf(false);
141141
} else {
142-
return this.groupDataService.findAllByHref(activeGroup._links.subgroups.href, {
142+
return this.groupDataService.findListByHref(activeGroup._links.subgroups.href, {
143143
currentPage: 1,
144144
elementsPerPage: 9999
145145
})

src/app/access-control/group-registry/groups-registry.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('GroupRegistryComponent', () => {
6969
mockGroups = [GroupMock, GroupMock2];
7070
mockEPeople = [EPersonMock, EPersonMock2];
7171
ePersonDataServiceStub = {
72-
findAllByHref(href: string): Observable<RemoteData<PaginatedList<EPerson>>> {
72+
findListByHref(href: string): Observable<RemoteData<PaginatedList<EPerson>>> {
7373
switch (href) {
7474
case 'https://dspace.4science.it/dspace-spring-rest/api/eperson/groups/testgroupid2/epersons':
7575
return createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo({
@@ -97,7 +97,7 @@ describe('GroupRegistryComponent', () => {
9797
};
9898
groupsDataServiceStub = {
9999
allGroups: mockGroups,
100-
findAllByHref(href: string): Observable<RemoteData<PaginatedList<Group>>> {
100+
findListByHref(href: string): Observable<RemoteData<PaginatedList<Group>>> {
101101
switch (href) {
102102
case 'https://dspace.4science.it/dspace-spring-rest/api/eperson/groups/testgroupid2/groups':
103103
return createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo({

0 commit comments

Comments
 (0)