Skip to content

Commit ef27ae8

Browse files
committed
Merge branch 'develop' into Remove'/SPA'
2 parents aa31132 + 0452723 commit ef27ae8

122 files changed

Lines changed: 7988 additions & 484 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.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ This changelog follows the principles of [Keep a Changelog](https://keepachangel
1818
- Added Notifications tab in Account Page
1919
- Added runtime configuration options for homepage branding and support link.
2020
- Added an environment variable to docker-compose-dev.yml to hide the OIDC client used in the SPA from the JSF frontend: DATAVERSE_AUTH_OIDC_HIDDEN_JSF: 1
21+
- Download with terms of use and guestbook.
2122

2223
### Changed
2324

dev-env/docker-compose-dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ services:
7272
-Ddataverse.files.s3.connection-pool-size=2048
7373
-Ddataverse.files.s3.custom-endpoint-region=us-east-1
7474
-Ddataverse.files.s3.custom-endpoint-url=https://s3.us-east-1.amazonaws.com
75-
# We publish the port on the host machine instead of just exposing it within the network, so that the browser can access the URLs of images generated by Dataverse (http://localhost:8080...).
76-
# This is necessary because the dev_nginx proxy is placed on top of the Dataverse service, making those URLs unreachable unless this port is exposed.
75+
# We publish the port on the host machine instead of just exposing it within the network, so that the browser can access the URLs of images generated by Dataverse (http://localhost:8080...).
76+
# This is necessary because the dev_nginx proxy is placed on top of the Dataverse service, making those URLs unreachable unless this port is exposed.
7777
# This workaround is only necessary and intended for the local dev environment and will not be used in the remote environment, where we use a production DNS.
7878
ports:
7979
- '8080:8080'
@@ -214,7 +214,7 @@ services:
214214
- DATAVERSE_DB_PORT=5432
215215
- DATAVERSE_DB_USER=${DATAVERSE_DB_USER}
216216
- DATAVERSE_DB_PASSWORD=secret
217-
- DATAVERSE_BASE_URL=http://dataverse:8080
217+
- DATAVERSE_BASE_URL=http://localhost:8000
218218
networks:
219219
dataverse:
220220
aliases:

dev-env/nginx.conf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ http {
99
# Default route for other URLs
1010
location / {
1111
proxy_pass http://dataverse:8080;
12+
proxy_set_header Host $http_host;
13+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
14+
proxy_set_header X-Forwarded-Proto $scheme;
15+
proxy_set_header X-Forwarded-Host $http_host;
16+
proxy_set_header X-Forwarded-Port $server_port;
1217
}
1318

1419
# Keycloak reverse proxy for /realms
@@ -23,31 +28,61 @@ http {
2328
# Specific route for /resources/images
2429
location /resources/images {
2530
proxy_pass http://dataverse:8080;
31+
proxy_set_header Host $http_host;
32+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
33+
proxy_set_header X-Forwarded-Proto $scheme;
34+
proxy_set_header X-Forwarded-Host $http_host;
35+
proxy_set_header X-Forwarded-Port $server_port;
2636
}
2737

2838
# Specific route for /resources/css
2939
location /resources/css {
3040
proxy_pass http://dataverse:8080;
41+
proxy_set_header Host $http_host;
42+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
43+
proxy_set_header X-Forwarded-Proto $scheme;
44+
proxy_set_header X-Forwarded-Host $http_host;
45+
proxy_set_header X-Forwarded-Port $server_port;
3146
}
3247

3348
# Specific route for /resources/js
3449
location /resources/js {
3550
proxy_pass http://dataverse:8080;
51+
proxy_set_header Host $http_host;
52+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
53+
proxy_set_header X-Forwarded-Proto $scheme;
54+
proxy_set_header X-Forwarded-Host $http_host;
55+
proxy_set_header X-Forwarded-Port $server_port;
3656
}
3757

3858
# Specific route for /resources/dev
3959
location /resources/dev {
4060
proxy_pass http://dataverse:8080;
61+
proxy_set_header Host $http_host;
62+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
63+
proxy_set_header X-Forwarded-Proto $scheme;
64+
proxy_set_header X-Forwarded-Host $http_host;
65+
proxy_set_header X-Forwarded-Port $server_port;
4166
}
4267

4368
# Specific route for /resources/fontcustom
4469
location /resources/fontcustom {
4570
proxy_pass http://dataverse:8080;
71+
proxy_set_header Host $http_host;
72+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
73+
proxy_set_header X-Forwarded-Proto $scheme;
74+
proxy_set_header X-Forwarded-Host $http_host;
75+
proxy_set_header X-Forwarded-Port $server_port;
4676
}
4777

4878
# Specific route for /resources/iqbs
4979
location /resources/iqbs {
5080
proxy_pass http://dataverse:8080;
81+
proxy_set_header Host $http_host;
82+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
83+
proxy_set_header X-Forwarded-Proto $scheme;
84+
proxy_set_header X-Forwarded-Host $http_host;
85+
proxy_set_header X-Forwarded-Port $server_port;
5186
}
5287

5388
# General route for other /resources routes, handled by Keycloak

dev-env/shib-dev-env/docker-compose-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ services:
208208
- DATAVERSE_DB_PORT=5432
209209
- DATAVERSE_DB_USER=${DATAVERSE_DB_USER}
210210
- DATAVERSE_DB_PASSWORD=secret
211-
- DATAVERSE_BASE_URL=http://dataverse:8080
211+
- DATAVERSE_BASE_URL=https://localhost
212212
networks:
213213
dataverse:
214214
aliases:

dev-env/shib-dev-env/nginx/nginx.conf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ http {
1212
# Default route for other URLs
1313
location / {
1414
proxy_pass http://dataverse:8080;
15+
proxy_set_header Host $http_host;
16+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
17+
proxy_set_header X-Forwarded-Proto $scheme;
18+
proxy_set_header X-Forwarded-Host $http_host;
19+
proxy_set_header X-Forwarded-Port $server_port;
1520
}
1621

1722
# Keycloak reverse proxy for /realms
@@ -26,31 +31,61 @@ http {
2631
# Specific route for /resources/images
2732
location /resources/images {
2833
proxy_pass http://dataverse:8080;
34+
proxy_set_header Host $http_host;
35+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
36+
proxy_set_header X-Forwarded-Proto $scheme;
37+
proxy_set_header X-Forwarded-Host $http_host;
38+
proxy_set_header X-Forwarded-Port $server_port;
2939
}
3040

3141
# Specific route for /resources/css
3242
location /resources/css {
3343
proxy_pass http://dataverse:8080;
44+
proxy_set_header Host $http_host;
45+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
46+
proxy_set_header X-Forwarded-Proto $scheme;
47+
proxy_set_header X-Forwarded-Host $http_host;
48+
proxy_set_header X-Forwarded-Port $server_port;
3449
}
3550

3651
# Specific route for /resources/js
3752
location /resources/js {
3853
proxy_pass http://dataverse:8080;
54+
proxy_set_header Host $http_host;
55+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
56+
proxy_set_header X-Forwarded-Proto $scheme;
57+
proxy_set_header X-Forwarded-Host $http_host;
58+
proxy_set_header X-Forwarded-Port $server_port;
3959
}
4060

4161
# Specific route for /resources/dev
4262
location /resources/dev {
4363
proxy_pass http://dataverse:8080;
64+
proxy_set_header Host $http_host;
65+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
66+
proxy_set_header X-Forwarded-Proto $scheme;
67+
proxy_set_header X-Forwarded-Host $http_host;
68+
proxy_set_header X-Forwarded-Port $server_port;
4469
}
4570

4671
# Specific route for /resources/fontcustom
4772
location /resources/fontcustom {
4873
proxy_pass http://dataverse:8080;
74+
proxy_set_header Host $http_host;
75+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
76+
proxy_set_header X-Forwarded-Proto $scheme;
77+
proxy_set_header X-Forwarded-Host $http_host;
78+
proxy_set_header X-Forwarded-Port $server_port;
4979
}
5080

5181
# Specific route for /resources/iqbs
5282
location /resources/iqbs {
5383
proxy_pass http://dataverse:8080;
84+
proxy_set_header Host $http_host;
85+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
86+
proxy_set_header X-Forwarded-Proto $scheme;
87+
proxy_set_header X-Forwarded-Host $http_host;
88+
proxy_set_header X-Forwarded-Port $server_port;
5489
}
5590

5691
# General route for other /resources routes, handled by Keycloak

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@dnd-kit/sortable": "8.0.0",
1919
"@dnd-kit/utilities": "3.2.2",
2020
"@faker-js/faker": "7.6.0",
21-
"@iqss/dataverse-client-javascript": "2.1.0-alpha.1",
21+
"@iqss/dataverse-client-javascript": "2.1.0-alpha.4",
2222
"@iqss/dataverse-design-system": "*",
2323
"@istanbuljs/nyc-config-typescript": "1.0.2",
2424
"@tanstack/react-table": "8.9.2",

packages/design-system/src/lib/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export { NavbarDropdown } from './components/navbar/navbar-dropdown/NavbarDropdo
1212
export { ThemeProvider, useTheme } from './components/theme/ThemeProvider'
1313
export { Breadcrumb } from './components/breadcrumb/Breadcrumb'
1414
export { Alert } from './components/alert/Alert'
15+
export type { AlertVariant } from './components/alert/AlertVariant'
1516
export { Tabs } from './components/tabs/Tabs'
1617
export { Accordion } from './components/accordion/Accordion'
1718
export { ButtonGroup } from './components/button-group/ButtonGroup'

packages/design-system/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"resolveJsonModule": true,
1616
"isolatedModules": true,
1717
"noEmit": true,
18-
"jsx": "react-jsx"
18+
"jsx": "react-jsx"
1919
},
2020
"include": ["src", "tests", "vite.config.ts", "cypress.config.ts", ".storybook/test-runner.ts"],
2121
"exclude": ["tests/**/**.spec.ts", "tests/**/**.spec.tsx"]

public/locales/en/dataset.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@
186186
"requestAccessTip": "If checked, users can request access to the restricted files in this dataset.",
187187
"requestAccessTrue": "Users may request access to files.",
188188
"requestAccessFalse": "Users may not request access to files.",
189+
"guestbookTitle": "Guestbook",
190+
"guestbookTip": "User information (i.e., name, email, institution, and position) will be collected when files are downloaded.",
191+
"guestbookDescription": "The following guestbook will prompt a user to provide additional information when downloading a file.",
192+
"noGuestbookAssigned": "No guestbook is assigned to this dataset so users will not be prompted to provide any information when downloading files. To learn more about guestbooks, visit the <anchor>Dataset Guestbook</anchor> section of the User Guide.",
193+
"guestbookPreviewButton": "Preview Guestbook",
189194
"restrictedFilesTip": "The number of restricted files in this dataset.",
190195
"dataAccessPlaceTip": "If the data is not only in Dataverse, list the location(s) where the data are currently stored.",
191196
"originalArchiveTip": "Archive from which the data was obtained.",
@@ -350,7 +355,7 @@
350355
"tabs": {
351356
"datasetTerms": "Dataset Terms",
352357
"restrictedFilesTerms": "Restricted Files + Terms of Access",
353-
"guestBook": "GuestBook"
358+
"guestbook": "Guestbook"
354359
},
355360
"datasetTerms": {
356361
"title": "Dataset Terms",
@@ -364,10 +369,11 @@
364369
"title": "Restricted Files + Terms of Access",
365370
"description": "Set up access restrictions and terms for restricted files in this dataset."
366371
},
367-
"guestBook": {
368-
"title": "GuestBook",
369-
"description": "Select a guestbook to have a user provide additional information when downloading a file.",
370-
"testGuestbook": "Test Guestbook",
372+
"guestbook": {
373+
"title": "Guestbook",
374+
"description": "Select a guestbook to have a user provide additional information when downloading a file. To learn more about guestbooks, visit the <anchor>Dataset Guestbook</anchor> section of the User Guide.",
375+
"clearSelection": "Clear Selection",
376+
"noGuestbooksEnabled": "There are no guestbooks enabled in {{collectionName}}. To create a guestbook, return to {{collectionName}}, click the \"Edit\" button and select the \"Dataset Guestbooks\" option.",
371377
"previewButton": "Preview Guestbook"
372378
},
373379
"unsavedChangesModal": {
@@ -376,6 +382,7 @@
376382
"stay": "Stay on this page",
377383
"leave": "Leave without saving"
378384
},
385+
"defaultGuestbookUpdateError": "An error occurred while updating the dataset guestbook. Please try again.",
379386
"defaultLicenseUpdateError": "An error occurred while updating the dataset license. Please try again.",
380387
"defaultTermsOfAccessUpdateError": "An error occurred while updating the dataset terms of access. Please try again."
381388
}

0 commit comments

Comments
 (0)