Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
1 change: 0 additions & 1 deletion docker/cli.assetstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion docker/cli.ingest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions docker/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
4 changes: 1 addition & 3 deletions docker/db.entities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -48,4 +46,4 @@ services:
<name-map collection-handle="123456789/28" submission-name="Journal"/> \
<name-map collection-handle="123456789/29" submission-name="JournalVolume"/> \
<name-map collection-handle="123456789/30" submission-name="JournalIssue"/>' /dspace/config/item-submission.xml
catalina.sh run
catalina.sh run
1 change: 0 additions & 1 deletion docker/docker-compose-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose-rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# http://www.dspace.org/license/
#

version: '3.7'
networks:
dspacenet:
services:
Expand Down
2 changes: 0 additions & 2 deletions docker/matomo-w-db.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.5"

services:
db:
image: mariadb
Expand Down
3 changes: 3 additions & 0 deletions src/app/core/handle/handle.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export class Handle extends ListableObject implements HALResource {
@autoserialize
url: string;

@autoserialize
resourceId: string;

/**
* The element of this metadata field
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
[(ngModel)]="handle"
[placeholder]="'handle-table.edit-handle.form-handle-input-placeholder' | translate">
</div>
<div class="form-group">
<label for="handleId">{{'handle-table.edit-handle.form-id-input-text' | translate}}</label>
<input type="text" class="form-control" id="handleId" name="handleId"
[(ngModel)]="id"
[placeholder]="'handle-table.edit-handle.form-id-input-placeholder' | translate"
[readonly]="true">
</div>
<div class="form-group" *ngIf="resourceType">
<label for="resourceType">{{'handle-table.table.resource-type' | translate}}</label>
<input type="text" class="form-control" id="resourceType" name="resourceType"
Expand All @@ -14,7 +21,7 @@
[readonly]="true">
</div>
<div class="form-group" *ngIf="resourceType">
<label for="resourceType">{{'handle-table.table.resource-id' | translate}}</label>
<label for="resourceId">{{'handle-table.table.resource-id' | translate}}</label>
<input type="text" class="form-control" id="resourceId" name="resourceId"
[(ngModel)]="resourceId"
[placeholder]="'handle-table.edit-handle.form-url-input-placeholder' | translate"
Expand Down
13 changes: 10 additions & 3 deletions src/app/handle-page/handle-table/handle-table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,21 @@ <h5 class="card-header">{{ 'handle-table.title' | translate }}</h5>
</span>
</td>
<td class="version-row-element-editor">
{{handle?.url}}
<a *ngIf="handle?.url" [href]="handle?.url" target="_blank" rel="noopener noreferrer">
{{handle?.url}}
</a>
</td>
<td class="version-row-element-editor">
{{handle?.resourceTypeID}}
</td>
<td class="version-row-element-editor">
<span *ngIf="handle?.resourceTypeID != null">
{{handle?.id}}
<span *ngIf="handle?.resourceId != null">
<a *ngIf="shouldLink(handle); else noLink" [href]="getHandleTargetPageRoute(handle)" target="_blank" rel="noopener noreferrer">
{{handle?.resourceId}}
</a>
<ng-template #noLink>
{{handle?.resourceId}}
</ng-template>
</span>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 27 additions & 1 deletion src/app/handle-page/handle-table/handle-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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 } },
);
}
Expand Down
1 change: 1 addition & 0 deletions src/app/shared/mocks/handle-mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 4 additions & 0 deletions src/assets/i18n/cs.json5
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down