diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3644944c947..3270d2491f1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -57,6 +57,10 @@ jobs: working-directory: build-scripts/run/ run: | ./start.sh dspace-$INSTANCE + cd ../.. + # use customized docker-compose file for the `85` port because the server is exposed with the namespace `repository` + # `/repository/server` + docker compose --env-file $ENVFILE -p dspace-$INSTANCE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f /opt/dspace-envs/5/docker-compose-rest.yml -f /opt/dspace-envs/5/docker-compose.yml up -d --no-build deploy-8: if: inputs.INSTANCE == '*' || inputs.INSTANCE == '8' @@ -147,7 +151,7 @@ jobs: playwright-after-deploy8: runs-on: ubuntu-latest needs: deploy-8 - timeout-minutes: 15 + timeout-minutes: 45 if: '!inputs.IMPORT' steps: - name: run playwright @@ -177,14 +181,14 @@ jobs: echo $RES # if last result is not success, return -1 and fail if [[ $RES != \"success\" ]]; then - echo "playwright tests have failed! check appropriate action run" + echo "playwright tests have failed! check appropriate action run in the dspace-ui-tests repository" exit 1 fi; rest-tests-after-deploy8: runs-on: ubuntu-latest needs: playwright-after-deploy8 - timeout-minutes: 15 + timeout-minutes: 45 steps: - name: run rest-tests run: | @@ -210,7 +214,7 @@ jobs: echo $RES # if last result is not success, return -1 and fail if [[ $RES != \"success\" ]]; then - echo "rest-tests have failed! check appropriate action run" + echo "rest-tests have failed! check appropriate action run in the dspace-rest-test repository" exit 1 fi; @@ -219,7 +223,7 @@ jobs: runs-on: ubuntu-latest needs: import-8 if: inputs.IMPORT - timeout-minutes: 15 + timeout-minutes: 45 steps: - name: run playwright run: | @@ -249,14 +253,14 @@ jobs: # if last result is not success, return -1 and fail if [[ $RES != \"success\" ]]; then - echo "playwright tests have failed! check appropriate action run" + echo "playwright tests have failed! check appropriate action run in the dspace-ui-tests repository" exit 1 fi; rest-tests-after-import8: runs-on: ubuntu-latest needs: playwright-after-import8 - timeout-minutes: 15 + timeout-minutes: 45 steps: - name: run rest-tests run: | @@ -282,6 +286,6 @@ jobs: echo $RES # if last result is not success, return -1 and fail if [[ $RES != \"success\" ]]; then - echo "rest-tests have failed! check appropriate action run" + echo "rest-tests have failed! check appropriate action run in the dspace-rest-test repository" exit 1 fi; diff --git a/README.md b/README.md index 053d55b040f..0be2f23c29d 100644 --- a/README.md +++ b/README.md @@ -569,3 +569,8 @@ The full license is available in the [LICENSE](LICENSE) file or online at http:/ DSpace uses third-party libraries which may be distributed under different licenses. Those licenses are listed in the [LICENSES_THIRD_PARTY](LICENSES_THIRD_PARTY) file. + +Additional tools +---------------- + +This project is tested with BrowserStack. diff --git a/config/config.example.yml b/config/config.example.yml index 9aae1fc79b4..8e23e60a8da 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -393,3 +393,7 @@ vocabularies: comcolSelectionSort: sortField: 'dc.title' sortDirection: 'ASC' + +matomo: + hostUrl: http://localhost:8135/ + siteId: 1 diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index c0ce3479cb7..999909f4321 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -94,6 +94,10 @@ services: entrypoint: - /bin/bash - '-c' + # When customizing the namespace, add the following command to the entrypoint command below (after `while ...`): + # `pushd ../webapps && unlink server && ln -s /dspace/webapps/server/ 'repository#server' && popd` + # This will create a symlink from the webapps directory to the server directory with the custom namespace + # (e.g. /dspace/webapps/server -> /dspace/webapps/repository#server) - | while (! /dev/null 2>&1; do sleep 1; done; pushd ../webapps && unlink server && ln -s /dspace/webapps/server/ 'repository#server' && popd diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 55d2354204c..659d8bbdb2c 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -17,7 +17,8 @@ services: TZ: ${TIMEZONE:-Europe/Bratislava} DSPACE_UI_SSL: 'false' DSPACE_UI_HOST: dspace-angular - DSPACE_UI_PORT: ${UI_PORT:-4000} + # Use only `4000`, not the {UI_PORT} from the .env because in the container it is always `4000` + DSPACE_UI_PORT: 4000 DSPACE_UI_NAMESPACE: ${DSPACE_UI_NAMESPACE:-/} DSPACE_REST_SSL: ${DSPACE_SSL:-false} DSPACE_REST_HOST: ${DSPACE_HOST:-localhost} diff --git a/docker/matomo-settings.ts b/docker/matomo-settings.ts new file mode 100644 index 00000000000..e0217cfb66b --- /dev/null +++ b/docker/matomo-settings.ts @@ -0,0 +1,7 @@ +/** + * Matomo settings for tracking statistics. This file could be mounted in the docker container. + */ +export const matomoSettings = { + hostUrl: 'http://localhost:8135/', + siteId: '1' +}; diff --git a/src/aai/aai.js b/src/aai/aai.js index 730e8c6b725..208a22d3b4d 100644 --- a/src/aai/aai.js +++ b/src/aai/aai.js @@ -38,7 +38,10 @@ if (redirectUrlFromLogin != null && redirectUrlFromLogin !== '') { // Redirect from the login page with retrieved redirect URL - redirectUrl = window.location.origin + (namespace === '' ? namespace : '/' + namespace) + redirectUrlFromLogin; + var baseUrl = window.location.origin + formatNamespace(namespace); + var redirectPath = ensureLeadingSlash(redirectUrlFromLogin); + + redirectUrl = baseUrl + redirectPath; } // Encode the redirect URL @@ -129,6 +132,20 @@ var cookieString = name + '=' + value + ';expires=' + expirationDate.toUTCString() + ';path=/'; document.cookie = cookieString; } + + /** + * Return empty string if namespace is empty, otherwise return namespace with leading slash. + */ + function formatNamespace(namespace) { + return namespace === '' ? '' : ensureLeadingSlash(namespace); + } + + /** + * Ensure that the path starts with a leading slash. + */ + function ensureLeadingSlash(path) { + return path.startsWith('/') ? path : '/' + path; + } } if (!window.aai) { diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 967cc55d9bc..0c02926c3f7 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -265,6 +265,11 @@ import { STATIC_PAGE_PATH } from './static-page/static-page-routing-paths'; path: STATIC_PAGE_PATH, loadChildren: () => import('./static-page/static-page.module').then((m) => m.StaticPageModule), }, + { + path: 'share-submission', + loadChildren: () => import('./share-submission/share-submission.module').then((m) => m.ShareSubmissionModule), + canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard] + }, { path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent } ] } diff --git a/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html b/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html index b73952718d5..86ee4eb1a14 100644 --- a/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html +++ b/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html @@ -14,6 +14,10 @@