diff --git a/Dockerfile b/Dockerfile index e7420983a0f..26b07b099ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ ENV NODE_OPTIONS="--max_old_space_size=4096" # Listen / accept connections from all IP addresses. # NOTE: At this time it is only possible to run Docker container in Production mode # if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485 -ENV NODE_ENV development +ENV NODE_ENV=development RUN apk add tzdata RUN yarn build:prod RUN npm install pm2 -g diff --git a/Dockerfile.dist b/Dockerfile.dist index 2a6a66fc063..de5b41ff64e 100644 --- a/Dockerfile.dist +++ b/Dockerfile.dist @@ -4,7 +4,7 @@ # Test build: # docker build -f Dockerfile.dist -t dspace/dspace-angular:dspace-7_x-dist . -FROM node:18-alpine as build +FROM node:18-alpine AS build # Ensure Python and other build tools are available # These are needed to install some node modules, especially on linux/arm64 @@ -26,6 +26,6 @@ COPY --chown=node:node docker/dspace-ui.json /app/dspace-ui.json WORKDIR /app USER node -ENV NODE_ENV production +ENV NODE_ENV=production EXPOSE 4000 -CMD pm2-runtime start dspace-ui.json --json +CMD ["pm2-runtime", "start", "dspace-ui.json", "--json"] diff --git a/docker/cli.assetstore.yml b/docker/cli.assetstore.yml index a1d6377bfee..ef5cf95caf6 100644 --- a/docker/cli.assetstore.yml +++ b/docker/cli.assetstore.yml @@ -12,7 +12,6 @@ # https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/cli.assetstore.yml # # Therefore, it should be kept in sync with that file -version: "3.7" networks: dspacenet: diff --git a/docker/cli.ingest.yml b/docker/cli.ingest.yml index 1db241af3bf..2f812cde038 100644 --- a/docker/cli.ingest.yml +++ b/docker/cli.ingest.yml @@ -12,7 +12,6 @@ # https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/cli.ingest.yml # # Therefore, it should be kept in sync with that file -version: "3.7" services: dspace-cli: diff --git a/docker/cli.yml b/docker/cli.yml index efe9034b6f2..9b2175491a9 100644 --- a/docker/cli.yml +++ b/docker/cli.yml @@ -6,8 +6,6 @@ # http://www.dspace.org/license/ # -version: "3.7" - services: dspace-cli: image: "${DOCKER_OWNER:-dataquest}/dspace-cli:${DSPACE_VER:-dspace-7_x}" diff --git a/docker/db.entities.yml b/docker/db.entities.yml index 6473bf2e385..d927af04df7 100644 --- a/docker/db.entities.yml +++ b/docker/db.entities.yml @@ -12,8 +12,6 @@ # https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/db.entities.yml # # # Therefore, it should be kept in sync with that file -version: "3.7" - services: dspacedb: image: dspace/dspace-postgres-pgcrypto:loadsql @@ -48,4 +46,4 @@ services: \ \ ' /dspace/config/item-submission.xml - catalina.sh run \ No newline at end of file + catalina.sh run diff --git a/docker/docker-compose-ci.yml b/docker/docker-compose-ci.yml index 9a2d674a761..5e930b7ba51 100644 --- a/docker/docker-compose-ci.yml +++ b/docker/docker-compose-ci.yml @@ -10,7 +10,6 @@ # This is used by our GitHub CI at .github/workflows/build.yml # It is based heavily on the Backend's Docker Compose: # https://github.com/DSpace/DSpace/blob/main/docker-compose.yml -version: '3.7' networks: dspacenet: services: diff --git a/docker/docker-compose-dist.yml b/docker/docker-compose-dist.yml index 00225e8052a..1f4d2d7f5e6 100644 --- a/docker/docker-compose-dist.yml +++ b/docker/docker-compose-dist.yml @@ -8,7 +8,6 @@ # Docker Compose for running the DSpace Angular UI dist build # for previewing with the DSpace Demo site backend -version: '3.7' networks: dspacenet: services: diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index e121fbd777e..d6eff67cea9 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -10,7 +10,6 @@ # This is based heavily on the docker-compose.yml that is available in the DSpace/DSpace # (Backend) at: # https://github.com/DSpace/DSpace/blob/main/docker-compose.yml -version: '3.7' networks: dspacenet: # Due to the following specification, THIS FILE (docker-compose-rest.yml) must be last (if using several YMLs), diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c6cc475a30c..6b5d32efff4 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,7 +6,6 @@ # http://www.dspace.org/license/ # -version: '3.7' networks: dspacenet: services: diff --git a/docker/matomo-w-db.yml b/docker/matomo-w-db.yml index ddacc7dbde4..1e7c23f6c94 100644 --- a/docker/matomo-w-db.yml +++ b/docker/matomo-w-db.yml @@ -1,5 +1,3 @@ -version: "3.5" - services: db: image: mariadb diff --git a/src/app/core/handle/handle.model.ts b/src/app/core/handle/handle.model.ts index 063d2189589..1160197d541 100644 --- a/src/app/core/handle/handle.model.ts +++ b/src/app/core/handle/handle.model.ts @@ -41,6 +41,9 @@ export class Handle extends ListableObject implements HALResource { @autoserialize url: string; + @autoserialize + resourceId: string; + /** * The element of this metadata field */ diff --git a/src/app/handle-page/edit-handle-page/edit-handle-page.component.html b/src/app/handle-page/edit-handle-page/edit-handle-page.component.html index fdca780899b..215e7d59f76 100644 --- a/src/app/handle-page/edit-handle-page/edit-handle-page.component.html +++ b/src/app/handle-page/edit-handle-page/edit-handle-page.component.html @@ -6,6 +6,13 @@ [(ngModel)]="handle" [placeholder]="'handle-table.edit-handle.form-handle-input-placeholder' | translate"> +
+ + +
- + {{ 'handle-table.title' | translate }} - {{handle?.url}} + + {{handle?.url}} + {{handle?.resourceTypeID}} - - {{handle?.id}} + + + {{handle?.resourceId}} + + + {{handle?.resourceId}} + diff --git a/src/app/handle-page/handle-table/handle-table.component.spec.ts b/src/app/handle-page/handle-table/handle-table.component.spec.ts index a7600298315..b13dd509ab0 100644 --- a/src/app/handle-page/handle-table/handle-table.component.spec.ts +++ b/src/app/handle-page/handle-table/handle-table.component.spec.ts @@ -128,7 +128,7 @@ describe('HandleTableComponent', () => { url: mockHandle.url, currentPage: (component as any).options.currentPage, resourceType: mockHandle.resourceTypeID, - resourceId: mockHandle.id + resourceId: mockHandle.resourceId } }; // should unselect diff --git a/src/app/handle-page/handle-table/handle-table.component.ts b/src/app/handle-page/handle-table/handle-table.component.ts index a08b93770fa..3f8b8a0e6b1 100644 --- a/src/app/handle-page/handle-table/handle-table.component.ts +++ b/src/app/handle-page/handle-table/handle-table.component.ts @@ -28,6 +28,9 @@ import { SITE, SUCCESSFUL_RESPONSE_START_CHAR } from '../../core/handle/handle.resource-type'; +import { getCommunityPageRoute } from '../../community-page/community-page-routing-paths'; +import { getCollectionPageRoute } from '../../collection-page/collection-page-routing-paths'; +import { getEntityPageRoute } from '../../item-page/item-page-routing-paths'; /** * Constants for converting the searchQuery for the server @@ -169,6 +172,29 @@ export class HandleTableComponent implements OnInit { }); } + getItemPageRoute(id: string): string { + return getEntityPageRoute(null, id); + } + + type2route(type: string): (id: string) => string { + switch (type) { + case COMMUNITY: + return getCommunityPageRoute; + case COLLECTION: + return getCollectionPageRoute; + case ITEM: + return this.getItemPageRoute; + } + } + + getHandleTargetPageRoute(handle: Handle): string { + return this.type2route(handle.resourceTypeID)(handle.resourceId); + } + + shouldLink(handle: Handle): boolean { + return handle.resourceTypeID !== SITE; + } + /** * Updates the page */ @@ -216,7 +242,7 @@ export class HandleTableComponent implements OnInit { this.switchSelectedHandle(this.selectedHandle); this.router.navigate([this.handleRoute, this.editHandlePath], { queryParams: { id: handle.id, _selflink: handle._links.self.href, handle: handle.handle, - url: handle.url, resourceType: handle.resourceTypeID, resourceId: handle.id, + url: handle.url, resourceType: handle.resourceTypeID, resourceId: handle.resourceId, currentPage: this.options.currentPage } }, ); } diff --git a/src/app/shared/mocks/handle-mock.ts b/src/app/shared/mocks/handle-mock.ts index c5bff91510b..45c161d7285 100644 --- a/src/app/shared/mocks/handle-mock.ts +++ b/src/app/shared/mocks/handle-mock.ts @@ -19,6 +19,7 @@ export const mockHandle = Object.assign(new Handle(), { handle: '123456', resourceTypeID: 0, url: 'handle.url', + resourceId: 'a43666e5-d477-4957-8e63-74baf6955d97', _links: { self: { href: 'url.123456' diff --git a/src/assets/i18n/cs.json5 b/src/assets/i18n/cs.json5 index cbd5a71cc42..347f7244a8f 100644 --- a/src/assets/i18n/cs.json5 +++ b/src/assets/i18n/cs.json5 @@ -2458,6 +2458,10 @@ "handle-table.edit-handle.form-archive-input-check": "Archivovat starĂ½ Handle?", // "handle-table.edit-handle.form-button-submit": "Submit", "handle-table.edit-handle.form-button-submit": "Odeslat", + //"handle-table.edit-handle.form-id-input-text": "ID", + "handle-table.edit-handle.form-id-input-text": "ID", + //"handle-table.edit-handle.form-id-input-placeholder": "...", + "handle-table.edit-handle.form-id-input-placeholder": "...", // "handle-page.title": "Handles", "handle-page.title": "Handle", // "handle-table.title": "Handle List", diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index b282b3bf685..cdc43133891 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -2019,6 +2019,9 @@ "handle-table.edit-handle.form-button-submit": "Submit", + "handle-table.edit-handle.form-id-input-text": "ID", + + "handle-table.edit-handle.form-id-input-placeholder": "...", "handle-page.title": "Handles",