Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
06a46aa
UFAL/Temporary fix for the type-bind. The form automatically refreshe…
milanmajchrak Dec 5, 2024
50f68bb
Execute autoregistration component only in client side (#762)
milanmajchrak Dec 5, 2024
d3aa70d
The Autocomplete Component is dynamically loaded as a standalone comp…
milanmajchrak Dec 5, 2024
ab2d477
UFAL/footer header images (#760)
jr-rk Dec 6, 2024
9e9d86f
ufal/customize the footer (#759)
jr-rk Dec 6, 2024
c90b1cc
Copied fixes from the lindat branch (#770)
milanmajchrak Dec 17, 2024
bc19dfe
The dtq-dev is run on /repository branch
milanmajchrak Dec 17, 2024
be6ea71
Waiting for the http://dev-5.pc:8$INSTANCE/server/api changed to http…
milanmajchrak Dec 17, 2024
23228f7
Added `repository` namespace to discojuice
milanmajchrak Dec 17, 2024
97587cc
Run UI integration tests every hour
milanmajchrak Jan 23, 2025
f70475a
Update actions/upload-artifact@v3 to v4
milanmajchrak Jan 23, 2025
9f98dc8
Run build CRON every 4 hours
milanmajchrak Jan 24, 2025
e0a69db
Update deploy.yml - changed runner
milanmajchrak Jan 28, 2025
3fcf70a
Update deploy.yml - updated runner everywhere
milanmajchrak Jan 28, 2025
a9f236e
Update deploy.yml - use `dspace-dep-1` runner again
milanmajchrak Jan 28, 2025
c044bb8
Fixed failing Integration tests (#773)
milanmajchrak Jan 29, 2025
10167b3
Update import action.yml - use `/repository` namespace in the import …
milanmajchrak Jan 29, 2025
0bdc06d
Merge pull request #2694 from hutattedonmyarm/dspace-7_x (#777)
milanmajchrak Jan 30, 2025
65596be
Update build.yml - added a option to manually run build action
milanmajchrak Jan 30, 2025
aa8ab01
save logs
Paurikova2 Feb 3, 2025
fca181e
missing $
Paurikova2 Feb 3, 2025
0a0ae97
print log file name for check
Paurikova2 Feb 3, 2025
d04cbde
removed superfluous space
Paurikova2 Feb 3, 2025
333dccc
renamed log file -> added 'log' at the end of the name
Paurikova2 Feb 4, 2025
9642195
Merge pull request #778 from dataquest-dev/import/saving-logs-during-…
Paurikova2 Feb 4, 2025
1dba9ab
Ufal/License issues (#779)
milanmajchrak Feb 4, 2025
b634553
Update action.yml - defined log_file
milanmajchrak Feb 5, 2025
ef89623
Update action.yml - log import into a specific path
milanmajchrak Feb 5, 2025
9baf936
Update action.yml - continuously copy logs from the import into anoth…
milanmajchrak Feb 5, 2025
5ffb54d
Update action.yml - import logging - show path info
milanmajchrak Feb 5, 2025
70d05de
Update action.yml - log import - copy logs after they are created
milanmajchrak Feb 5, 2025
b05e6b2
Update action.yml - Start appending when the first file is added to t…
milanmajchrak Feb 5, 2025
948d934
Merge remote-tracking branch 'dataquest/dtq-dev' into HEAD
kosarko Feb 14, 2025
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
14 changes: 10 additions & 4 deletions .github/actions/import-db/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ runs:
DB5PORT: 15432
DB5NAME: dspace-import-db5
DB7PORT: 543${{ inputs.INSTANCE }}
BEURL: http://dev-5.pc:8${{ inputs.INSTANCE }}/server/api
BEURL: http://dev-5.pc:8${{ inputs.INSTANCE }}/repository/server/api
run: |
docker stop $DB5NAME || true
echo "====="
Expand All @@ -50,9 +50,6 @@ runs:
cid=$(docker run -d --rm --name $DB5NAME -v $(pwd):/dq/scripts -v $DATADIR/dump:/dq/dump -p 127.0.0.1:$DB5PORT:5432 -e POSTGRES_DB=empty -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=dspace postgres /bin/bash -c "cd /dq/scripts && ./init.dspacedb5.sh")
echo "cid=$cid" >> $GITHUB_OUTPUT
sleep 60
echo "====="
docker logs $DB5NAME || true
echo "====="
# copy assetstore
echo Preparing assetstore
if [[ -z ${{ inputs.ASSETSTORE }} ]]; then
Expand All @@ -69,6 +66,15 @@ runs:
rm __temp/resume/*.json || true
# arguments of the script
# required
echo "====="
# Generate the current timestamp for the log filename
timestamp=$(date +"%y%m%d%H%M")
log_file_timestamp="${{ inputs.LOGDIR }}python.${timestamp}.log"
echo $log_file_timestamp
mkdir ../__logs
# Continuously append to the log file $log_file_timestamp. Start appending when the first file is added to the __logs folder.
while true; do tail -F --retry ../__logs/*.txt 2>/dev/null >> $log_file_timestamp & sleep 2; done &
echo "====="
args=(
--resume=false
--config=backend.endpoint=$BEURL
Expand Down
3 changes: 2 additions & 1 deletion .github/disabled-workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
echo "started handle server"
# this seems to be the easiest solution for now
docker restart dockerized-nginx-with-shibboleth-nginx-1
/bin/bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://dev-5.pc:8$INSTANCE/server/api)" != "200" ]]; do sleep 5; done'
/bin/bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://dev-5.pc:8$INSTANCE/repository/server/api)" != "200" ]]; do sleep 5; done'


import-8:
Expand All @@ -121,6 +121,7 @@ jobs:
INSTANCE: ${{ env.INSTANCE }}
DATADIR: /opt/dspace-data/clarin-dspace/
ASSETSTORE: /opt/dspace-data/clarin-dspace/assetstore/
LOGDIR: /log/

- name: dspace basic command
run: |
Expand Down
46 changes: 28 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ on:
branches:
- clarin-v7
- customer/*
schedule:
- cron: '0 */4 * * *'
pull_request:
workflow_dispatch:

permissions:
contents: read # to fetch code (actions/checkout)
Expand Down Expand Up @@ -41,6 +44,8 @@ jobs:
#CHROME_VERSION: "90.0.4430.212-1"
# Bump Node heap size (OOM in CI after upgrading to Angular 15)
NODE_OPTIONS: '--max-old-space-size=4096'
# Project name to use when running docker compose prior to e2e tests
COMPOSE_PROJECT_NAME: 'ci'
strategy:
# Create a matrix of Node versions to test against (in parallel)
matrix:
Expand All @@ -51,11 +56,11 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v3
uses: actions/checkout@v4

# https://github.com/actions/setup-node
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -80,7 +85,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache Yarn dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
# Cache entire Yarn cache directory (see previous step)
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -107,10 +112,10 @@ jobs:
# so that it can be shared with the 'codecov' job (see below)
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
- name: Upload code coverage report to Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.node-version == '18.x'
with:
name: dspace-angular coverage report
name: coverage-report-${{ matrix.node-version }}
path: 'coverage/dspace-angular/lcov.info'
retention-days: 14

Expand All @@ -126,7 +131,7 @@ jobs:
# https://github.com/cypress-io/github-action
# (NOTE: to run these e2e tests locally, just use 'ng e2e')
- name: Run e2e tests (integration tests)
uses: cypress-io/github-action@v5
uses: cypress-io/github-action@v6
with:
# Run tests in Chrome, headless mode (default)
browser: chrome
Expand All @@ -141,19 +146,19 @@ jobs:
# Cypress always creates a video of all e2e tests (whether they succeeded or failed)
# Save those in an Artifact
- name: Upload e2e test videos to Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-test-videos
name: e2e-test-videos-${{ matrix.node-version }}
path: cypress/videos

# If e2e tests fail, Cypress creates a screenshot of what happened
# Save those in an Artifact
- name: Upload e2e test failure screenshots to Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: e2e-test-screenshots
name: e2e-test-screenshots-${{ matrix.node-version }}
path: cypress/screenshots

- name: Stop app (in case it stays up after e2e tests)
Expand Down Expand Up @@ -190,31 +195,36 @@ jobs:
- name: Shutdown Docker containers
run: docker compose -f ./docker/docker-compose-ci.yml down

# # Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
# # job above. This is necessary because Codecov uploads seem to randomly fail at times.
# # See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
# Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
# job above. This is necessary because Codecov uploads seem to randomly fail at times.
# See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
# codecov:
# # Must run after 'tests' job above
# needs: tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# uses: actions/checkout@v4
#
# # Download artifacts from previous 'tests' job
# - name: Download coverage artifacts
# uses: actions/download-artifact@v3
# uses: actions/download-artifact@v4
#
# # Now attempt upload to Codecov using its action.
# # NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
# #
# # Retry action: https://github.com/marketplace/actions/retry-action
# # Codecov action: https://github.com/codecov/codecov-action
# - name: Upload coverage to Codecov.io
# uses: Wandalen/wretry.action@v1.0.36
# uses: Wandalen/wretry.action@v1.3.0
# with:
# action: codecov/codecov-action@v3
# # Try upload 5 times max
# action: codecov/codecov-action@v4
# # Ensure codecov-action throws an error when it fails to upload
# # This allows us to auto-restart the action if an error is thrown
# with: |
# fail_ci_if_error: true
# token: ${{ secrets.CODECOV_TOKEN }}
# # Try re-running action 5 times max
# attempt_limit: 5
# # Run again in 30 seconds
# attempt_delay: 30000
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
# See https://github.com/toshimaru/auto-author-assign
- name: Assign PR to creator
uses: toshimaru/auto-author-assign@v1.6.2
uses: toshimaru/auto-author-assign@v2.1.0
1 change: 0 additions & 1 deletion cypress/e2e/browse-by-author.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { testA11y } from 'cypress/support/utils';

describe('Browse By Author', () => {
it('should pass accessibility tests', () => {
Expand Down
5 changes: 2 additions & 3 deletions cypress/e2e/browse-by-dateissued.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { testA11y } from 'cypress/support/utils';

describe('Browse By Date Issued', () => {
it('should pass accessibility tests', () => {
cy.visit('/browse/dateissued');

// Wait for <ds-browse-by-date-page> to be visible
cy.get('ds-browse-by-date-page').should('be.visible');

// Removed the accessibility tests because the whole UI is customized
// Analyze <ds-browse-by-date-page> for accessibility
testA11y('ds-browse-by-date-page');
// testA11y('ds-browse-by-date-page');
});
});
5 changes: 2 additions & 3 deletions cypress/e2e/browse-by-title.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { testA11y } from 'cypress/support/utils';

describe('Browse By Title', () => {
it('should pass accessibility tests', () => {
cy.visit('/browse/title');

// Wait for <ds-browse-by-title-page> to be visible
cy.get('ds-browse-by-title-page').should('be.visible');

// Removed the accessibility tests because the whole UI is customized
// Analyze <ds-browse-by-title-page> for accessibility
testA11y('ds-browse-by-title-page');
// testA11y('ds-browse-by-title-page');
});
});
3 changes: 3 additions & 0 deletions cypress/e2e/submission-ui.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ describe('Create a new submission', () => {
},() => {
createItemProcess.clickOnSelectionInput('dc.type');
createItemProcess.clickOnTypeSelection('Corpus');
// Wait because after the type change, the `Save` request is sent, and the page is reloaded.
// The checkbox could be checked during the reloading process.
cy.wait(500);
createItemProcess.checkCheckbox('local_hasCMDI');
createItemProcess.controlCheckedCheckbox('local_hasCMDI',true);
createItemProcess.clickOnSave();
Expand Down
9 changes: 7 additions & 2 deletions docker/docker-compose-rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,17 @@ services:
- /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`
# `pushd ../webapps && (unlink server || true) && (ln -s /dspace/webapps/server/ 'repository#server' || true) &&
# popd`
# The `(... || true)` condition is necessary to ensure the `popd` command runs at the end.
# It used to fail when the `server` folder did not exist in `/webapps`.
# 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/tcp/dspacedb/543${INSTANCE}) > /dev/null 2>&1; do sleep 1; done;
pushd ../webapps && (unlink server || true) && (ln -s /dspace/webapps/server/ 'repository#server' || true) && popd
/dspace/bin/dspace database migrate force
custom_run.sh
./custom_run.sh
/dspace/bin/start-handle-server
# DSpace database container
dspacedb:
Expand Down Expand Up @@ -168,6 +172,7 @@ services:
cp -r -u /opt/solr/server/solr/configsets/dspace/statistics/* statistics
exec solr -p 898${INSTANCE} -f -m 4g
volumes:
# Commented out because there are a lot of files in the assetstore
assetstore:
pgdata:
solr_data:
Expand Down
2 changes: 1 addition & 1 deletion src/aai/aai.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
function AAI() {
var host = 'https://' + window.location.hostname,
ourEntityID = host.match("lindat.mff.cuni.cz") ? "https://ufal-point.mff.cuni.cz" : host;
var namespace = '';
var namespace = 'repository';
this.defaults = {
//host : 'https://ufal-point.mff.cuni.cz',
host : host, //better default (useful when testing on ufal-point-dev)
Expand Down
5 changes: 5 additions & 0 deletions src/app/app-routing-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export function getBitstreamModuleRoute() {
export function getBitstreamDownloadRoute(bitstream): string {
return new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'download').toString();
}

export function getBitstreamContentRoute(bitstream): string {
return new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'content').toString();
}

export function getBitstreamRequestACopyRoute(item, bitstream): { routerLink: string, queryParams: any } {
const url = new URLCombiner(getItemModuleRoute(), item.uuid, 'request-a-copy').toString();
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { RemoteDataBuildService } from '../../core/cache/builders/remote-data-bu
import { HttpOptions } from '../../core/dspace-rest/dspace-rest.service';
import { Router } from '@angular/router';
import { getItemPageRoute } from '../../item-page/item-page-routing-paths';
import { getBitstreamDownloadRoute } from '../../app-routing-paths';
import { getBitstreamContentRoute } from '../../app-routing-paths';
import { hasFailed } from 'src/app/core/data/request-entry-state.model';
import { FindListOptions } from '../../core/data/find-list-options.model';
import isEqual from 'lodash/isEqual';
Expand Down Expand Up @@ -255,10 +255,12 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
.subscribe(bitstream$ => {
bitstream = bitstream$;
});
let bitstreamDownloadPath = getBitstreamDownloadRoute(bitstream);
let bitstreamDownloadPath = getBitstreamContentRoute(bitstream);
if (isNotEmpty(downloadToken)) {
bitstreamDownloadPath = bitstreamDownloadPath + '?dtoken=' + downloadToken;
bitstreamDownloadPath = this.halService.getRootHref() + '/core' + bitstreamDownloadPath +
'?dtoken=' + downloadToken;
}

this.hardRedirectService.redirect(bitstreamDownloadPath);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { RemoteData } from '../../core/data/remote-data';
import { PaginatedList } from '../../core/data/paginated-list.model';
import { ClarinLicense } from '../../core/shared/clarin/clarin-license.model';
import { getFirstCompletedRemoteData, getFirstSucceededRemoteData } from '../../core/shared/operators';
import { switchMap } from 'rxjs/operators';
import { scan, switchMap } from 'rxjs/operators';
import { PaginationService } from '../../core/pagination/pagination.service';
import { ClarinLicenseDataService } from '../../core/data/clarin/clarin-license-data.service';
import { defaultPagination, defaultSortConfiguration } from '../clarin-license-table-pagination';
Expand Down Expand Up @@ -320,21 +320,28 @@ export class ClarinLicenseTableComponent implements OnInit {
*/
loadAllLicenses() {
this.selectedLicense = null;

this.licensesRD$ = new BehaviorSubject<RemoteData<PaginatedList<ClarinLicense>>>(null);
this.isLoading = true;

// load the current pagination and sorting options
const currentPagination$ = this.paginationService.getCurrentPagination(this.options.id, this.options);
const currentSort$ = this.paginationService.getCurrentSort(this.options.id, defaultSortConfiguration);

observableCombineLatest([currentPagination$, currentSort$]).pipe(
switchMap(([currentPagination, currentSort]) => {
return this.clarinLicenseService.searchBy('byNameLike',{
currentPage: currentPagination.currentPage,
const currentPagination$ = this.getCurrentPagination();
const currentSort$ = this.getCurrentSort();
const searchTerm$ = new BehaviorSubject<string>(this.searchingLicenseName);

observableCombineLatest([currentPagination$, currentSort$, searchTerm$]).pipe(
scan((prevState, [currentPagination, currentSort, searchTerm]) => {
// If search term has changed, reset to page 1; otherwise, keep current page
const currentPage = prevState.searchTerm !== searchTerm ? 1 : currentPagination.currentPage;
return { currentPage, currentPagination, currentSort, searchTerm };
}, { searchTerm: '', currentPage: 1, currentPagination: this.getCurrentPagination(),
currentSort: this.getCurrentSort() }),

switchMap(({ currentPage, currentPagination, currentSort, searchTerm }) => {
return this.clarinLicenseService.searchBy('byNameLike', {
currentPage: currentPage, // Properly reset page only when needed
elementsPerPage: currentPagination.pageSize,
sort: {field: currentSort.field, direction: currentSort.direction},
searchParams: [Object.assign(new RequestParam('name', this.searchingLicenseName))]
sort: { field: currentSort.field, direction: currentSort.direction },
searchParams: [new RequestParam('name', searchTerm)]
}, false
);
}),
Expand All @@ -361,7 +368,24 @@ export class ClarinLicenseTableComponent implements OnInit {
}
}

/**
* Initialize the pagination options. Set the default values.
*/
private initializePaginationOptions() {
this.options = defaultPagination;
}

/**
* Get the current pagination options.
*/
private getCurrentPagination() {
return this.paginationService.getCurrentPagination(this.options.id, this.options);
}

/**
* Get the current sorting options.
*/
private getCurrentSort() {
return this.paginationService.getCurrentSort(this.options.id, defaultSortConfiguration);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h4 class="modal-title">{{'clarin-license.define-license-form.form-name' | trans
<label id="requiredInfo" for="requiredInfo">{{'clarin-license.define-license-form.required-info' | translate}}</label>
<div *ngFor="let ri of requiredInfoOptions">
<input type="checkbox" formArrayName="requiredInfo" [value]="ri"
[checked]="ri | dsCheckedLicense: requiredInfo"
[checked]="ri | dsCheckedRI: requiredInfo"
(change)="changeCheckboxValue($event,'requiredInfo', ri)"/>
{{ ri.value }}
</div>
Expand Down
Loading