Skip to content

Commit

Permalink
Merge branch 'dspace-cris-7' into dspace-cris-7-orcid-relpref
Browse files Browse the repository at this point in the history
  • Loading branch information
floriangantner committed Oct 13, 2023
2 parents 77a4145 + 4645448 commit 2d80d3d
Show file tree
Hide file tree
Showing 303 changed files with 10,609 additions and 2,536 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
DSPACE_UI_HOST: 127.0.0.1
# When Chrome version is specified, we pin to a specific version of Chrome
# Comment this out to use the latest release
#CHROME_VERSION: "90.0.4430.212-1"
CHROME_VERSION: "116.0.5845.187-1"
strategy:
# Create a matrix of Node versions to test against (in parallel)
matrix:
Expand Down
27 changes: 27 additions & 0 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
options:
runs-on: ubuntu-latest

definitions:
steps:
- step: &unittest-code-checks
name: test-code-checks
image:
name: cypress/browsers:node18.12.0-chrome107
run-as-user: 1000
size: 2x
caches:
- node
script:
- yarn install --frozen-lockfile
- yarn run lint --quiet
- yarn run check-circ-deps
- yarn run build:prod
- yarn run test:headless

pipelines:
branches:
'dspace-cris-7':
- step: *unittest-code-checks
pull-requests:
'**':
- step: *unittest-code-checks
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dspace-angular",
"version": "2023.01.01-SNAPSHOT",
"version": "2023.02.00-SNAPSHOT",
"scripts": {
"ng": "ng",
"config:watch": "nodemon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import { RequestService } from '../../core/data/request.service';
import { PaginationService } from '../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
import { FindListOptions } from '../../core/data/find-list-options.model';
import { UUIDService } from '../../core/shared/uuid.service';
import { getMockUUIDService } from '../../shared/mocks/uuid.service.mock';

describe('EPeopleRegistryComponent', () => {
let component: EPeopleRegistryComponent;
Expand Down Expand Up @@ -138,7 +140,8 @@ describe('EPeopleRegistryComponent', () => {
{ provide: FormBuilderService, useValue: builderService },
{ provide: Router, useValue: new RouterStub() },
{ provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) },
{ provide: PaginationService, useValue: paginationService }
{ provide: PaginationService, useValue: paginationService },
{ provide: UUIDService, useValue: getMockUUIDService() }
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { RequestService } from '../../core/data/request.service';
import { PageInfo } from '../../core/shared/page-info.model';
import { NoContent } from '../../core/shared/NoContent.model';
import { PaginationService } from '../../core/pagination/pagination.service';
import { UUIDService } from '../../core/shared/uuid.service';

@Component({
selector: 'ds-epeople-registry',
Expand Down Expand Up @@ -58,7 +59,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy {
* Pagination config used to display the list of epeople
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'elp',
id: this.uuidService.generate(),
pageSize: 5,
currentPage: 1
});
Expand Down Expand Up @@ -93,6 +94,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy {
private router: Router,
private modalService: NgbModal,
private paginationService: PaginationService,
private uuidService: UUIDService,
public requestService: RequestService) {
this.currentSearchQuery = '';
this.currentSearchScope = 'metadata';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import { PaginationServiceStub } from '../../../shared/testing/pagination-servic
import { FindListOptions } from '../../../core/data/find-list-options.model';
import { ValidateEmailNotTaken } from './validators/email-taken.validator';
import { EpersonRegistrationService } from '../../../core/data/eperson-registration.service';
import { UUIDService } from '../../../core/shared/uuid.service';
import { getMockUUIDService } from '../../../shared/mocks/uuid.service.mock';

describe('EPersonFormComponent', () => {
let component: EPersonFormComponent;
Expand Down Expand Up @@ -207,6 +209,7 @@ describe('EPersonFormComponent', () => {
{ provide: PaginationService, useValue: paginationService },
{ provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring'])},
{ provide: EpersonRegistrationService, useValue: epersonRegistrationService },
{ provide: UUIDService, useValue: getMockUUIDService() },
EPeopleRegistryComponent
],
schemas: [NO_ERRORS_SCHEMA]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { ValidateEmailNotTaken } from './validators/email-taken.validator';
import { Registration } from '../../../core/shared/registration.model';
import { EpersonRegistrationService } from '../../../core/data/eperson-registration.service';
import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email-form.component';
import { UUIDService } from '../../../core/shared/uuid.service';

@Component({
selector: 'ds-eperson-form',
Expand Down Expand Up @@ -150,7 +151,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
* Pagination config used to display the list of groups
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'gem',
id: this.uuidService.generate(),
pageSize: 5,
currentPage: 1
});
Expand Down Expand Up @@ -183,6 +184,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
private paginationService: PaginationService,
public requestService: RequestService,
private epersonRegistrationService: EpersonRegistrationService,
private uuidService: UUIDService
) {
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
this.epersonInitial = eperson;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import { NotificationsServiceStub } from '../../../../shared/testing/notificatio
import { RouterMock } from '../../../../shared/mocks/router.mock';
import { PaginationService } from '../../../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../../../shared/testing/pagination-service.stub';
import { UUIDService } from '../../../../core/shared/uuid.service';
import { getMockUUIDService } from '../../../../shared/mocks/uuid.service.mock';

describe('MembersListComponent', () => {
let component: MembersListComponent;
Expand Down Expand Up @@ -135,6 +137,7 @@ describe('MembersListComponent', () => {
{ provide: FormBuilderService, useValue: builderService },
{ provide: Router, useValue: new RouterMock() },
{ provide: PaginationService, useValue: paginationService },
{ provide: UUIDService, useValue: getMockUUIDService() }
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { NotificationsService } from '../../../../shared/notifications/notificat
import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
import { EpersonDtoModel } from '../../../../core/eperson/models/eperson-dto.model';
import { PaginationService } from '../../../../core/pagination/pagination.service';
import { UUIDService } from '../../../../core/shared/uuid.service';

/**
* Keys to keep track of specific subscriptions
Expand Down Expand Up @@ -105,15 +106,15 @@ export class MembersListComponent implements OnInit, OnDestroy {
* Pagination config used to display the list of EPeople that are result of EPeople search
*/
configSearch: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'sml',
id: this.uuidService.generate(),
pageSize: 5,
currentPage: 1
});
/**
* Pagination config used to display the list of EPerson Membes of active group being edited
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'ml',
id: this.uuidService.generate(),
pageSize: 5,
currentPage: 1
});
Expand Down Expand Up @@ -143,7 +144,8 @@ export class MembersListComponent implements OnInit, OnDestroy {
protected notificationsService: NotificationsService,
protected formBuilder: FormBuilder,
protected paginationService: PaginationService,
private router: Router
private router: Router,
protected uuidService: UUIDService
) {
this.currentSearchQuery = '';
this.currentSearchScope = 'metadata';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import { NotificationsServiceStub } from '../../../../shared/testing/notificatio
import { map } from 'rxjs/operators';
import { PaginationService } from '../../../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../../../shared/testing/pagination-service.stub';
import { UUIDService } from '../../../../core/shared/uuid.service';
import { getMockUUIDService } from '../../../../shared/mocks/uuid.service.mock';

describe('SubgroupsListComponent', () => {
let component: SubgroupsListComponent;
Expand Down Expand Up @@ -121,6 +123,7 @@ describe('SubgroupsListComponent', () => {
{ provide: FormBuilderService, useValue: builderService },
{ provide: Router, useValue: routerStub },
{ provide: PaginationService, useValue: paginationService },
{ provide: UUIDService, useValue: getMockUUIDService() }
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { PaginationComponentOptions } from '../../../../shared/pagination/pagina
import { NoContent } from '../../../../core/shared/NoContent.model';
import { PaginationService } from '../../../../core/pagination/pagination.service';
import { followLink } from '../../../../shared/utils/follow-link-config.model';
import { UUIDService } from '../../../../core/shared/uuid.service';

/**
* Keys to keep track of specific subscriptions
Expand Down Expand Up @@ -58,15 +59,15 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
* Pagination config used to display the list of groups that are result of groups search
*/
configSearch: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'ssgl',
id: this.uuidService.generate(),
pageSize: 5,
currentPage: 1
});
/**
* Pagination config used to display the list of subgroups of currently active group being edited
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'sgl',
id: this.uuidService.generate(),
pageSize: 5,
currentPage: 1
});
Expand All @@ -88,7 +89,8 @@ export class SubgroupsListComponent implements OnInit, OnDestroy {
private notificationsService: NotificationsService,
private formBuilder: FormBuilder,
private paginationService: PaginationService,
private router: Router) {
private router: Router,
private uuidService: UUIDService) {
this.currentSearchQuery = '';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import { PaginationService } from '../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
import { FeatureID } from '../../core/data/feature-authorization/feature-id';
import { NoContent } from '../../core/shared/NoContent.model';
import { UUIDService } from '../../core/shared/uuid.service';
import { getMockUUIDService } from '../../shared/mocks/uuid.service.mock';

describe('GroupRegistryComponent', () => {
let component: GroupsRegistryComponent;
Expand Down Expand Up @@ -179,7 +181,8 @@ describe('GroupRegistryComponent', () => {
{ provide: Router, useValue: new RouterMock() },
{ provide: AuthorizationDataService, useValue: authorizationService },
{ provide: PaginationService, useValue: paginationService },
{ provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) }
{ provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) },
{ provide: UUIDService, useValue: getMockUUIDService() }
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { PaginationComponentOptions } from '../../shared/pagination/pagination-c
import { NoContent } from '../../core/shared/NoContent.model';
import { PaginationService } from '../../core/pagination/pagination.service';
import { followLink } from '../../shared/utils/follow-link-config.model';
import { UUIDService } from '../../core/shared/uuid.service';

@Component({
selector: 'ds-groups-registry',
Expand All @@ -54,7 +55,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy {
* Pagination config used to display the list of groups
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'gl',
id: this.uuidService.generate(),
pageSize: 5,
currentPage: 1
});
Expand Down Expand Up @@ -104,6 +105,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy {
private router: Router,
private authorizationService: AuthorizationDataService,
private paginationService: PaginationService,
private uuidService: UUIDService,
public requestService: RequestService) {
this.currentSearchQuery = '';
this.searchForm = this.formBuilder.group(({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
import { createPaginatedList } from '../../../shared/testing/utils.test';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../../shared/testing/pagination-service.stub';
import { UUIDService } from '../../../core/shared/uuid.service';
import { getMockUUIDService } from '../../../shared/mocks/uuid.service.mock';

describe('BitstreamFormatsComponent', () => {
let comp: BitstreamFormatsComponent;
Expand Down Expand Up @@ -108,7 +110,8 @@ describe('BitstreamFormatsComponent', () => {
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
{ provide: NotificationsService, useValue: notificationsServiceStub },
{ provide: PaginationService, useValue: paginationService }
{ provide: PaginationService, useValue: paginationService },
{ provide: UUIDService, useValue: getMockUUIDService() }
]
}).compileComponents();
};
Expand Down Expand Up @@ -236,7 +239,8 @@ describe('BitstreamFormatsComponent', () => {
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
{ provide: NotificationsService, useValue: notificationsServiceStub },
{ provide: PaginationService, useValue: paginationService }
{ provide: PaginationService, useValue: paginationService },
{ provide: UUIDService, useValue: getMockUUIDService() }
]
}).compileComponents();
}
Expand Down Expand Up @@ -285,7 +289,8 @@ describe('BitstreamFormatsComponent', () => {
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
{ provide: NotificationsService, useValue: notificationsServiceStub },
{ provide: PaginationService, useValue: paginationService }
{ provide: PaginationService, useValue: paginationService },
{ provide: UUIDService, useValue: getMockUUIDService() }
]
}).compileComponents();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { NoContent } from '../../../core/shared/NoContent.model';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { FindListOptions } from '../../../core/data/find-list-options.model';
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
import { UUIDService } from '../../../core/shared/uuid.service';

/**
* This component renders a list of bitstream formats
Expand All @@ -33,7 +34,7 @@ export class BitstreamFormatsComponent implements OnInit, OnDestroy {
* Currently simply renders all bitstream formats
*/
pageConfig: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'rbp',
id: this.uuidService.generate(),
pageSize: 20,
pageSizeOptions: [20, 40, 60, 80, 100]
});
Expand All @@ -43,6 +44,7 @@ export class BitstreamFormatsComponent implements OnInit, OnDestroy {
private translateService: TranslateService,
private bitstreamFormatService: BitstreamFormatDataService,
private paginationService: PaginationService,
private uuidService: UUIDService
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ <h2 id="header" class="border-bottom pb-2">{{'admin.registries.metadata.head' |
<th scope="col">{{'admin.registries.metadata.schemas.table.id' | translate}}</th>
<th scope="col">{{'admin.registries.metadata.schemas.table.namespace' | translate}}</th>
<th scope="col">{{'admin.registries.metadata.schemas.table.name' | translate}}</th>
<th scope="col">
<div class="d-flex justify-content-center">
{{'admin.registries.metadata.schemas.table.download' | translate}}
</div>
</th>
</tr>
</thead>
<tbody>
Expand All @@ -39,6 +44,13 @@ <h2 id="header" class="border-bottom pb-2">{{'admin.registries.metadata.head' |
<td class="selectable-row" (click)="editSchema(schema)"><a [routerLink]="[schema.prefix]">{{schema.id}}</a></td>
<td class="selectable-row" (click)="editSchema(schema)"><a [routerLink]="[schema.prefix]">{{schema.namespace}}</a></td>
<td class="selectable-row" (click)="editSchema(schema)"><a [routerLink]="[schema.prefix]">{{schema.prefix}}</a></td>
<td class="selectable-row">
<div class="d-flex justify-content-center">
<button class="btn btn-sm btn-outline-primary" (click)="onDownloadSchema(schema)">
<i class="fas fa-download" aria-hidden="true" ></i>
</button>
</div>
</td>
</tr>
</tbody>
</table>
Expand Down
Loading

0 comments on commit 2d80d3d

Please sign in to comment.