Skip to content

Commit 3a2e917

Browse files
committed
Merge branch 'main' into Issue/3985
# Conflicts: # package-lock.json # package.json
2 parents 315e989 + b1c4aa4 commit 3a2e917

173 files changed

Lines changed: 5400 additions & 974 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.

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
# Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 20+
2525
DSPACE_UI_HOST: 127.0.0.1
2626
DSPACE_UI_PORT: 4000
27+
DSPACE_UI_BASEURL: http://127.0.0.1:4000
2728
# Ensure all SSR caching is disabled in test environment
2829
DSPACE_CACHE_SERVERSIDE_BOTCACHE_MAX: 0
2930
DSPACE_CACHE_SERVERSIDE_ANONYMOUSCACHE_MAX: 0

.github/workflows/docker.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ jobs:
7474
DSPACE_REST_HOST: 127.0.0.1
7575
# Override default dspace.ui.url to also use 127.0.0.1.
7676
dspace__P__ui__P__url: http://127.0.0.1:4000
77+
# Override default ui.baseUrl to also use 127.0.0.1. This must match 'dspace.ui.url' for SSR to be enabled.
78+
DSPACE_UI_BASEURL: http://127.0.0.1:4000
7779
steps:
7880
# Checkout our codebase (to get access to Docker Compose scripts)
7981
- name: Checkout codebase

config/config.example.yml

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ ui:
88
ssl: false
99
host: localhost
1010
port: 4000
11+
# Specify the public URL that this user interface responds to. This corresponds to the "dspace.ui.url" property in your backend's local.cfg.
12+
# SSR is only enabled when the client's "Host" HTTP header matches this baseUrl. The baseUrl is also used for redirects and SEO links (in robots.txt).
13+
baseUrl: http://localhost:4000
1114
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
1215
nameSpace: /
1316
# The rateLimiter settings limit each IP to a 'limit' of 500 requests per 'windowMs' (1 minute).
@@ -237,7 +240,12 @@ submission:
237240
- value: default
238241
style: text-muted
239242
icon: fa-circle-xmark
240-
243+
# Icons to be displayed next to an authority controlled value, to give indication of the source.
244+
sourceIcons:
245+
# Example of configuration for authority logo based on sources.
246+
# The configured icon will be displayed next to the authority value in submission and on item page or search results.
247+
- source: orcid
248+
- path: assets/images/orcid.logo.icon.svg
241249
# Fallback language in which the UI will be rendered if the user's browser language is not an active language
242250
fallbackLanguage: en
243251

@@ -397,6 +405,30 @@ item:
397405
pageSize: 5
398406
# Show the bitstream access status label on the item page
399407
showAccessStatuses: false
408+
# Configuration of metadata to be displayed in the item metadata link view popover
409+
metadataLinkViewPopoverData:
410+
# Metdadata list to be displayed for entities without a specific configuration
411+
fallbackMetdataList:
412+
- dc.description.abstract
413+
- dc.description.note
414+
# Configuration for each entity type
415+
entityDataConfig:
416+
- entityType: Person
417+
# Descriptive metadata (popover body)
418+
metadataList:
419+
- person.affiliation.name
420+
- person.email
421+
# Title metadata (popover header)
422+
titleMetadataList:
423+
- person.givenName
424+
- person.familyName
425+
# Configuration for identifier subtypes, based on metadata like dc.identifier.ror where ror is the subtype.
426+
# This is used to map the layout of the identifier in the popover and the icon displayed next to the metadata value.
427+
identifierSubtypes:
428+
- name: ror
429+
icon: assets/images/ror.logo.icon.svg
430+
iconPosition: IdentifierSubtypesIconPositionEnum.LEFT
431+
link: https://ror.org
400432

401433
# Community Page Config
402434
community:
@@ -645,3 +677,62 @@ geospatialMapViewer:
645677
accessibility:
646678
# The duration in days after which the accessibility settings cookie expires
647679
cookieExpirationDuration: 7
680+
681+
# Configuration for layout customization of metadata rendering in Item page
682+
# Currently only the authority reference config is available, more will follow with the integration of the so called CRIS layout.
683+
layout:
684+
# Configuration of icons and styles to be used for each authority controlled link
685+
authorityRef:
686+
- entityType: DEFAULT
687+
entityStyle:
688+
default:
689+
icon: fa fa-user
690+
style: text-info
691+
- entityType: PERSON
692+
entityStyle:
693+
person:
694+
icon: fa fa-user
695+
style: text-success
696+
default:
697+
icon: fa fa-user
698+
style: text-info
699+
- entityType: ORGUNIT
700+
entityStyle:
701+
default:
702+
icon: fa fa-university
703+
style: text-success
704+
- entityType: PROJECT
705+
entityStyle:
706+
default:
707+
icon: fas fa-project-diagram
708+
style: text-success
709+
710+
# Configuration for customization of search results
711+
searchResults:
712+
# Metadata fields to be displayed in the search results under the standard ones
713+
additionalMetadataFields:
714+
- dc.contributor.author
715+
- dc.date.issued
716+
- dc.type
717+
# Metadata fields to be displayed in the search results for the author section
718+
authorMetadata:
719+
- dc.contributor.author
720+
- dc.creator
721+
- dc.contributor.*
722+
# When the search results are retrieved, for each item type the metadata with a valid authority value are inspected.
723+
# Referenced items will be fetched with a find all by id strategy to avoid individual rest requests
724+
# to efficiently display the search results.
725+
followAuthorityMetadata:
726+
- type: Publication
727+
metadata: dc.contributor.author
728+
- type: Product
729+
metadata: dc.contributor.author
730+
731+
# The maximum number of item to process when following authority metadata values.
732+
followAuthorityMaxItemLimit: 100
733+
734+
# The maximum number of metadata values to process for each metadata key
735+
# when following authority metadata values.
736+
followAuthorityMetadataValuesLimit: 5
737+
738+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
describe('Limit public config properties', () => {
2+
it('Should not include cache.serverSide properties in the html source code',
3+
() => {
4+
cy.request('/').its('body').then((text: string) => {
5+
expect(text).to.not.contain('"serverSide":');
6+
});
7+
},
8+
);
9+
it('Should not include cache.serverSide properties in the config.json',
10+
() => {
11+
cy.request('/assets/config.json').its('body').then((obj: any) => {
12+
expect(obj.cache).to.not.haveOwnProperty('serverSide');
13+
});
14+
},
15+
);
16+
});

cypress/e2e/my-dspace.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ describe('My DSpace page', () => {
255255
cy.get('[data-test="list-object"]')
256256
.then(($items) => {
257257
const itemWithClaim = [...$items].find(item =>
258-
item.querySelector('[data-test="claim-button"]')
258+
item.querySelector('[data-test="claim-button"]'),
259259
);
260-
expect(itemWithClaim, 'item with claim button').to.exist;
260+
cy.wrap(itemWithClaim).should('exist');
261261
cy.wrap(itemWithClaim).as('selectedItem');
262262
cy.wrap(itemWithClaim).within(() => {
263263
cy.get('ds-pool-task-actions').should('exist');

docker/cli.assetstore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
dspace-cli:
1717
environment:
1818
# This assetstore zip is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
19-
- LOADASSETS=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/assetstore.tar.gz
19+
- LOADASSETS=${LOADASSETS:-https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/assetstore.tar.gz}
2020
entrypoint:
2121
- /bin/bash
2222
- '-c'

docker/cli.ingest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
services:
1616
dspace-cli:
1717
environment:
18-
- AIPZIP=https://github.com/DSpace-Labs/AIP-Files/raw/main/dogAndReport.zip
19-
- ADMIN_EMAIL=test@test.edu
20-
- AIPDIR=/tmp/aip-dir
18+
- AIPZIP=${AIPZIP:-https://github.com/DSpace-Labs/AIP-Files/raw/main/dogAndReport.zip}
19+
- ADMIN_EMAIL=${ADMIN_EMAIL:-test@test.edu}
20+
- AIPDIR=${AIPDIR:-/tmp/aip-dir}
2121
entrypoint:
2222
- /bin/bash
2323
- '-c'

docker/cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ services:
2929
# __P__ => "." (e.g. dspace__P__dir => dspace.dir)
3030
# __D__ => "-" (e.g. google__D__metadata => google-metadata)
3131
# db.url: Ensure we are using the 'dspacedb' image for our database
32-
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
32+
db__P__url: ${db__P__url:-jdbc:postgresql://dspacedb:5432/dspace}
3333
# solr.server: Ensure we are using the 'dspacesolr' image for Solr
34-
solr__P__server: http://dspacesolr:8983/solr
34+
solr__P__server: ${solr__P__server:-http://dspacesolr:8983/solr}
3535
networks:
3636
- dspacenet
3737
volumes:

docker/db.entities.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
environment:
1919
# This LOADSQL should be kept in sync with the URL in DSpace/DSpace
2020
# This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
21-
- LOADSQL=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql
21+
- LOADSQL=${LOADSQL:-https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql}
2222
dspace:
2323
### OVERRIDE default 'entrypoint' in 'docker-compose-rest.yml' ####
2424
# Ensure that the database is ready BEFORE starting tomcat

docker/docker-compose-ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ services:
2222
# __P__ => "." (e.g. dspace__P__dir => dspace.dir)
2323
# __D__ => "-" (e.g. google__D__metadata => google-metadata)
2424
# dspace.dir, dspace.server.url and dspace.ui.url
25-
dspace__P__dir: /dspace
26-
dspace__P__server__P__url: http://127.0.0.1:8080/server
27-
dspace__P__ui__P__url: http://127.0.0.1:4000
25+
dspace__P__dir: ${dspace__P__dir:-/dspace}
26+
dspace__P__server__P__url: ${dspace__P__server__P__url:-http://127.0.0.1:8080/server}
27+
dspace__P__ui__P__url: ${dspace__P__ui__P__url:-http://127.0.0.1:4000}
2828
# db.url: Ensure we are using the 'dspacedb' image for our database
29-
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
29+
db__P__url: ${db__P__url:-jdbc:postgresql://dspacedb:5432/dspace}
3030
# solr.server: Ensure we are using the 'dspacesolr' image for Solr
31-
solr__P__server: http://dspacesolr:8983/solr
31+
solr__P__server: ${solr__P__server:-http://dspacesolr:8983/solr}
3232
# Tell Statistics to commit all views immediately instead of waiting on Solr's autocommit.
3333
# This allows us to generate statistics in e2e tests so that statistics pages can be tested thoroughly.
34-
solr__D__statistics__P__autoCommit: 'false'
35-
LOGGING_CONFIG: /dspace/config/log4j2-container.xml
34+
solr__D__statistics__P__autoCommit: ${solr__D__statistics__P__autoCommit:-false}
35+
LOGGING_CONFIG: ${LOGGING_CONFIG:-/dspace/config/log4j2-container.xml}
3636
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-latest-test}"
3737
depends_on:
3838
- dspacedb

0 commit comments

Comments
 (0)