Skip to content

Commit 0fef938

Browse files
milanmajchrakPaurikova2vidiecankosarkoMatus Kasak
authored
UFAL/Resolve conflicts before merge (#764)
* Removed dynamic overflow because every content must be scrollable.. (#716) * add tar for preview (#713) * add tar for preview * UFAL/Enhanced type-bind feature (#714) * The type-bind is loaded from the cfg and correctly rendered * Done some refactoring * Update tests following the type-bind enhancement * Fixed linting error. * Removed unwanted changes and fixed wrong refactored code. * Updated error message when tests failed * Update README.md * UFAL/Show sesznam license on approval page (#722) * Added static files from the SEZNAM license. * Refactored fetching html content from the static files. The logic was moved into the common service. * Show Seznam static license on approval page. * Updated constant name LICENSE_NAME_SEZNAM - added the _CZ to make it more clear that is Czech license * UFAL/share submission by email (#720) * Added share submission button into workspaceitem actions page. * Added notification about the success of the sharing the submission. * Created share submission module, page with routing. That page could access only the administrator. * WIP - created a new page `change-submitter-page`. * Created page when the user could take the workspace item as its own. * Pretified the code and added some docs * Updated tests following the new feature * Fixed unwanted changes, updated docs * UFAL/Autocomplete enhancement (#718) * Added support for searching results from specific solr indexes. Updated autocomplete component to search values from custom solr index. The autocomplete component could have attribute for resolving the custom index from the submission-forms definition. * Show suggestions for `solr-handle_title_ac` and `solr-subject_ac` * Fixed tests * Formatted language suggestions, added docs and fixed tests. * Refactored the code following the review requirements. * Fixed type in the word pretify * UFAL/License page - wrong layout in Firefox (#721) * Removed flex class and used width style instead of col * Removed unsued class * Changed style in the html into classes * Migrated Vanilla cs messages into clarin 7.6.1. cs messages (#669) * Migrated Vanilla cs messages into clarin 7.6.1. cs messages * updated translation * Updated cs localization for subcommunities and subcollections * Changed `prispeveku` to `prispevku` * Updated messages for the 'supervised' and 'claim' sentenses --------- Co-authored-by: Ondrej Kosarko <kosarko@ufal.mff.cuni.cz> * UFAL/Share submission with user not only admin (#728) * The submitter information cannot be displayed in some cases, but show a few information about the Item * Added missing trailing comma * Fixed docs * Updated messages following last commit to upstream. (#731) * Updated dspace prefix to lindat (#734) * Added notification when the shibboleth authentication is failed (#732) * Removed two IT: (#737) 1. Author does not have a two input fields. 2. Test for checking the notice step will be transformed into UI test, because we do not want to keep such specific collection for generic IT. * Update all static licenses (#726) * added licenses from ufal commit dcbe87e02931dee78b13c4b3995a6cef3aeacd32 * added missing static licenses * remove static from licenses path * no_static_ as const * checkstyle * Use NAMESPACES from the .env (#727) * Use NAMESPACES from the .env * Created symbolic link for the tomcat folder * Updated docker compose files - can load more properties from the `.env` * Update deploy.yml to increase timeout (#738) Because some tests were canceled during processing. * Use only 4000, not the {UI_PORT} from the .env because in the container it is always 4000 (#740) * Update docker-compose-rest.yml Uncommented /repository/ namespace in the docker-compose.yml. It is only for one deploy. * Update docker-compose-rest.yml Undo exposing server on the /repository/ path * Use only / and /server namespaces, not the values from the .env because in the container it is always `/` and `/server` (#741) * Expose tomcat `/server` on `/repository/server` * Take a customized docker-compose-rest.yml which exposes the server on /repository/server * Updated a path to take right docker-compose files * Undo using only default namespaced `/` and `/server` * Use custom `docker-compose.yml` from the testing server * UFAL/Shibboleth fixed wrong redirect after login with verification token (#733) * Used hardredirect instead of the standard router.redirect because the user could be stucked on the loading page * Added doc why * Added missing whitespace * Use path `./assets` instead of `/assets` (#742) * new download instruction for cmd using zip from backend (#739) * Get UI base URL from BE (#744) * Check that the custom type bind field in configured in the `submission-forms` when it is configured in the cfg property (#745) * Searching by type is changed to 'type' instead of 'itemtype' because it was changed in the autocomplete enhnancement (#749) * Use `autoLogin` method (#747) * UFAL/Matomo statistics using angulartics2 (#748) * Modified matomo tracking in footer component * Do not use routerless Matomo because we want to track view on every page redirect * The Matomo statistics are tracked properly. * Prettyfied the code * Fix linting error * Fixed unit tests following the matomo statistics update * Fixed linting error * Added a document title in the footer * Added category to the eventTrack because it is required for the Matomo. * Refactored using matomo statistics - added into browser init service, because the Matomo statistics wasn't rendered on production * Changed matomo-settings location --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> * Update db-import action Try a commit when the import worked. * Update import-db action - use main branch * Added a translation for the searching filter `subjectFirstValue` (redirect from home page). (#752) * Ensure the redirect URL starts with a slash (#753) * Added volume into docker-compose (#754) * UFAL/Load the matomo configuration from the environment (#755) * Added volume into docker-compose * Take a matomo configuration from the environment * Fetch the matomo properties from the config, not from the environment (#756) * Load the szn license in oninit method (#757) * UFAL/Temporary fix for the type-bind. The form automatically refreshes after the type is changed. (#761) * The Save action is automatically dispatched when the type is changed * Updated the handleFormSave method name to `dispatchFormSaveAndReinitialize` * Added missing function to mock object * Execute autoregistration component only in client side (#762) * The Autocomplete Component is dynamically loaded as a standalone component only in the browser using the Loader component. (#763) * UFAL/footer header images (#760) * Footer images upload to assets/images/footer/ and change of images src attributes * Changed src paths to start with ./ --------- Co-authored-by: Juraj Roka <juraj.roka@dataquest.sk> * ufal/customize the footer (#759) * Footer details update by Lindat live instance's footer * Copied UI tests fix from the dtq-dev --------- Co-authored-by: Juraj Roka <juraj.roka@dataquest.sk> Co-authored-by: milanmajchrak <milan.majchrak@dataquest.sk> --------- Co-authored-by: Paurikova2 <107862249+Paurikova2@users.noreply.github.com> Co-authored-by: Jozef Misutka <332350+vidiecan@users.noreply.github.com> Co-authored-by: Ondrej Kosarko <kosarko@ufal.mff.cuni.cz> Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> Co-authored-by: jurinecko <95219754+jr-rk@users.noreply.github.com> Co-authored-by: Juraj Roka <juraj.roka@dataquest.sk>
1 parent 5fd9aab commit 0fef938

104 files changed

Lines changed: 12151 additions & 1907 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/deploy.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ jobs:
5757
working-directory: build-scripts/run/
5858
run: |
5959
./start.sh dspace-$INSTANCE
60+
cd ../..
61+
# use customized docker-compose file for the `85` port because the server is exposed with the namespace `repository`
62+
# `/repository/server`
63+
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
6064
6165
deploy-8:
6266
if: inputs.INSTANCE == '*' || inputs.INSTANCE == '8'
@@ -147,7 +151,7 @@ jobs:
147151
playwright-after-deploy8:
148152
runs-on: ubuntu-latest
149153
needs: deploy-8
150-
timeout-minutes: 15
154+
timeout-minutes: 45
151155
if: '!inputs.IMPORT'
152156
steps:
153157
- name: run playwright
@@ -177,14 +181,14 @@ jobs:
177181
echo $RES
178182
# if last result is not success, return -1 and fail
179183
if [[ $RES != \"success\" ]]; then
180-
echo "playwright tests have failed! check appropriate action run"
184+
echo "playwright tests have failed! check appropriate action run in the dspace-ui-tests repository"
181185
exit 1
182186
fi;
183187
184188
rest-tests-after-deploy8:
185189
runs-on: ubuntu-latest
186190
needs: playwright-after-deploy8
187-
timeout-minutes: 15
191+
timeout-minutes: 45
188192
steps:
189193
- name: run rest-tests
190194
run: |
@@ -210,7 +214,7 @@ jobs:
210214
echo $RES
211215
# if last result is not success, return -1 and fail
212216
if [[ $RES != \"success\" ]]; then
213-
echo "rest-tests have failed! check appropriate action run"
217+
echo "rest-tests have failed! check appropriate action run in the dspace-rest-test repository"
214218
exit 1
215219
fi;
216220
@@ -219,7 +223,7 @@ jobs:
219223
runs-on: ubuntu-latest
220224
needs: import-8
221225
if: inputs.IMPORT
222-
timeout-minutes: 15
226+
timeout-minutes: 45
223227
steps:
224228
- name: run playwright
225229
run: |
@@ -249,14 +253,14 @@ jobs:
249253
# if last result is not success, return -1 and fail
250254
if [[ $RES != \"success\" ]]; then
251255
252-
echo "playwright tests have failed! check appropriate action run"
256+
echo "playwright tests have failed! check appropriate action run in the dspace-ui-tests repository"
253257
exit 1
254258
fi;
255259
256260
rest-tests-after-import8:
257261
runs-on: ubuntu-latest
258262
needs: playwright-after-import8
259-
timeout-minutes: 15
263+
timeout-minutes: 45
260264
steps:
261265
- name: run rest-tests
262266
run: |
@@ -282,6 +286,6 @@ jobs:
282286
echo $RES
283287
# if last result is not success, return -1 and fail
284288
if [[ $RES != \"success\" ]]; then
285-
echo "rest-tests have failed! check appropriate action run"
289+
echo "rest-tests have failed! check appropriate action run in the dspace-rest-test repository"
286290
exit 1
287291
fi;

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,3 +569,8 @@ The full license is available in the [LICENSE](LICENSE) file or online at http:/
569569

570570
DSpace uses third-party libraries which may be distributed under different licenses. Those licenses are listed
571571
in the [LICENSES_THIRD_PARTY](LICENSES_THIRD_PARTY) file.
572+
573+
Additional tools
574+
----------------
575+
576+
This project is tested with BrowserStack.

config/config.example.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,3 +393,7 @@ vocabularies:
393393
comcolSelectionSort:
394394
sortField: 'dc.title'
395395
sortDirection: 'ASC'
396+
397+
matomo:
398+
hostUrl: http://localhost:8135/
399+
siteId: 1

docker/docker-compose-rest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ services:
9494
entrypoint:
9595
- /bin/bash
9696
- '-c'
97+
# When customizing the namespace, add the following command to the entrypoint command below (after `while ...`):
98+
# `pushd ../webapps && unlink server && ln -s /dspace/webapps/server/ 'repository#server' && popd`
99+
# This will create a symlink from the webapps directory to the server directory with the custom namespace
100+
# (e.g. /dspace/webapps/server -> /dspace/webapps/repository#server)
97101
- |
98102
while (!</dev/tcp/dspacedb/543${INSTANCE}) > /dev/null 2>&1; do sleep 1; done;
99103
pushd ../webapps && unlink server && ln -s /dspace/webapps/server/ 'repository#server' && popd

docker/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ services:
1717
TZ: ${TIMEZONE:-Europe/Bratislava}
1818
DSPACE_UI_SSL: 'false'
1919
DSPACE_UI_HOST: dspace-angular
20-
DSPACE_UI_PORT: ${UI_PORT:-4000}
20+
# Use only `4000`, not the {UI_PORT} from the .env because in the container it is always `4000`
21+
DSPACE_UI_PORT: 4000
2122
DSPACE_UI_NAMESPACE: ${DSPACE_UI_NAMESPACE:-/}
2223
DSPACE_REST_SSL: ${DSPACE_SSL:-false}
2324
DSPACE_REST_HOST: ${DSPACE_HOST:-localhost}

docker/matomo-settings.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Matomo settings for tracking statistics. This file could be mounted in the docker container.
3+
*/
4+
export const matomoSettings = {
5+
hostUrl: 'http://localhost:8135/',
6+
siteId: '1'
7+
};

src/aai/aai.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838

3939
if (redirectUrlFromLogin != null && redirectUrlFromLogin !== '') {
4040
// Redirect from the login page with retrieved redirect URL
41-
redirectUrl = window.location.origin + (namespace === '' ? namespace : '/' + namespace) + redirectUrlFromLogin;
41+
var baseUrl = window.location.origin + formatNamespace(namespace);
42+
var redirectPath = ensureLeadingSlash(redirectUrlFromLogin);
43+
44+
redirectUrl = baseUrl + redirectPath;
4245
}
4346

4447
// Encode the redirect URL
@@ -129,6 +132,20 @@
129132
var cookieString = name + '=' + value + ';expires=' + expirationDate.toUTCString() + ';path=/';
130133
document.cookie = cookieString;
131134
}
135+
136+
/**
137+
* Return empty string if namespace is empty, otherwise return namespace with leading slash.
138+
*/
139+
function formatNamespace(namespace) {
140+
return namespace === '' ? '' : ensureLeadingSlash(namespace);
141+
}
142+
143+
/**
144+
* Ensure that the path starts with a leading slash.
145+
*/
146+
function ensureLeadingSlash(path) {
147+
return path.startsWith('/') ? path : '/' + path;
148+
}
132149
}
133150

134151
if (!window.aai) {

src/app/app-routing.module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@ import { STATIC_PAGE_PATH } from './static-page/static-page-routing-paths';
265265
path: STATIC_PAGE_PATH,
266266
loadChildren: () => import('./static-page/static-page.module').then((m) => m.StaticPageModule),
267267
},
268+
{
269+
path: 'share-submission',
270+
loadChildren: () => import('./share-submission/share-submission.module').then((m) => m.ShareSubmissionModule),
271+
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard]
272+
},
268273
{ path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent }
269274
]
270275
}

src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ <h2 id="header" class="border-bottom pb-2">{{'clarin.license.agreement.title' |
1414
<div class="card bg-clarin-yellow border-clarin-yellow">
1515
<div class="card-body text-center">
1616
<a [href]="clarinLicense?.definition">{{clarinLicense?.name}}</a>
17+
<div *ngIf="clarinLicense?.name === LICENSE_NAME_SEZNAM"
18+
class="pt-3"
19+
[innerHTML]="(licenseContentSeznam | async) | dsSafeHtml">
20+
</div>
1721
</div>
1822
</div>
1923
</div>

src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { FindListOptions } from '../../core/data/find-list-options.model';
4141
import isEqual from 'lodash/isEqual';
4242
import cloneDeep from 'lodash/cloneDeep';
4343
import { ClarinUserMetadataDataService } from '../../core/data/clarin/clarin-user-metadata.service';
44+
import { HtmlContentService } from '../../shared/html-content.service';
4445

4546
/**
4647
* The component shows the user's filled in user metadata and the user can fill in other required user metadata.
@@ -106,6 +107,21 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
106107
*/
107108
helpDesk$: Observable<RemoteData<ConfigurationProperty>>;
108109

110+
/**
111+
* The Seznam dataset license content. It is shown directly in this approval page.
112+
*/
113+
LICENSE_NAME_SEZNAM = 'Seznam Dataset Licence';
114+
115+
/**
116+
* The path to the Seznam dataset license content.
117+
*/
118+
LICENSE_PATH_SEZNAM_CZ = 'szn-dataset-license.html';
119+
120+
/**
121+
* The content of the Seznam dataset license. Fetch from the static file.
122+
*/
123+
licenseContentSeznam: BehaviorSubject<string> = new BehaviorSubject<string>('');
124+
109125
constructor(
110126
protected clarinLicenseResourceMappingService: ClarinLicenseResourceMappingService,
111127
protected configurationDataService: ConfigurationDataService,
@@ -121,7 +137,8 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
121137
protected rdbService: RemoteDataBuildService,
122138
private hardRedirectService: HardRedirectService,
123139
private requestService: RequestService,
124-
private clarinUserMetadataDataService: ClarinUserMetadataDataService) { }
140+
private clarinUserMetadataDataService: ClarinUserMetadataDataService,
141+
private htmlContentService: HtmlContentService) { }
125142

126143
ngOnInit(): void {
127144
// Load CurrentItem by bitstreamID to show itemHandle
@@ -143,6 +160,19 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
143160
// The user is signed in and has record in the userRegistration
144161
// Load userRegistration and userMetadata from userRegistration repository
145162
this.loadUserRegistrationAndUserMetadata();
163+
164+
// Load the Seznam dataset license content
165+
this.loadLicenseContentSeznam();
166+
}
167+
168+
/**
169+
* Load the content for the special license. This content is shown directly in this approval page.
170+
*/
171+
loadLicenseContentSeznam() {
172+
this.htmlContentService.getHmtlContentByPathAndLocale(this.LICENSE_PATH_SEZNAM_CZ).then(content => {
173+
this.licenseContentSeznam.next(content);
174+
});
175+
return true;
146176
}
147177

148178
public accept() {

0 commit comments

Comments
 (0)