Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Téléchargement carte 56 #62

Open
wants to merge 464 commits into
base: api_telechargement_mvp
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
464 commits
Select commit Hold shift + click to select a range
1e99f74
feat(inputs): improvements to image-input similar to file-input
jahow Aug 24, 2024
c530006
chore: i18n
jahow Aug 24, 2024
4c358e6
feat(platform): better keyword mapping, include bbox
jahow Aug 22, 2024
77758b5
feat(platform): add a method for searching a keyword in a given thesa…
jahow Aug 22, 2024
b1f8e96
feat(editor): separate component for keyword editing
jahow Aug 22, 2024
c7bcaa4
feat(editor): add spatial extent form field
jahow Aug 22, 2024
27a14e7
feat(editor): add spatial extents field to record form
jahow Aug 22, 2024
487e640
chore(me): use ng-mocks in tests
jahow Aug 22, 2024
79d6456
chore(ui): add export of switch-toggle component
jahow Aug 22, 2024
14bf4d1
feat(me): add ol.css
jahow Aug 21, 2024
f5a3a0c
feat(editor): show a warning when a place keyword does not have a bbox
jahow Aug 21, 2024
4dd2152
chore: i18n
jahow Aug 22, 2024
11c27b9
chore(ui-map): fix wrong import messing up translations
jahow Aug 22, 2024
7a7b40f
fix(editor): keep a cache of keywords shown in spatial extents
jahow Aug 26, 2024
ebe9333
fix(converter): properly write and read spatial extents in XML
jahow Aug 26, 2024
a7c0c75
Merge pull request #970 from geonetwork/ME-attached-resources-ui
jahow Aug 26, 2024
e7ff1d2
Merge pull request #973 from geonetwork/dependabot/npm_and_yarn/micro…
jahow Aug 26, 2024
4a4ec1d
fix(me): back button goes to search after record creation
jahow Aug 27, 2024
10a614b
Merge pull request #975 from geonetwork/me-fix-create-back-error
jahow Aug 27, 2024
a9aa234
Apply PR comments
Angi-Kinas Aug 27, 2024
a6f221e
Merge pull request #941 from geonetwork/ME-geographical-extent
Angi-Kinas Aug 27, 2024
e393ac5
feat(editor): add undo to the editor facade
LHBruneton-C2C Aug 22, 2024
a995a57
feat(editor): refresh each form field on record restore
LHBruneton-C2C Aug 22, 2024
6d40aa2
e2e(editor): undo
LHBruneton-C2C Aug 22, 2024
cfaafc5
chore(editor): i18n
LHBruneton-C2C Aug 27, 2024
7a893ad
Merge pull request #966 from geonetwork/ME/draft-rollback
LHBruneton-C2C Aug 27, 2024
1722354
detect that record was never saved + change canDelete name
cmoinier Aug 25, 2024
4876122
fix dashboard not loading all records
cmoinier Aug 25, 2024
e4734e0
change canDelete name (now used beyond this scope)
cmoinier Aug 25, 2024
6a5058b
display new columns names and data
cmoinier Aug 25, 2024
788bddd
change owner on saving
cmoinier Aug 25, 2024
07ad642
translations
cmoinier Aug 25, 2024
199ed20
e2e draft
cmoinier Aug 27, 2024
b41d1fb
e2e testing
cmoinier Aug 27, 2024
b086787
fix ut
cmoinier Aug 27, 2024
84c13a1
set owner after saving record
cmoinier Aug 28, 2024
3ddd486
center date
cmoinier Aug 28, 2024
4bffb74
latest main dump
cmoinier Aug 28, 2024
ec7ea52
allow draft records to be saved
cmoinier Aug 28, 2024
77ccd7a
fix e2e
cmoinier Aug 28, 2024
df7f741
update ut
cmoinier Aug 28, 2024
f11b783
feat(editor): prefill contact informations with current user
C2CRomualdCaplier Aug 1, 2024
6ea11fb
added e2e tests
C2CRomualdCaplier Aug 1, 2024
6e317bc
refactor(lib): refactored UserModel
C2CRomualdCaplier Aug 26, 2024
e97caaf
Merge pull request #955 from geonetwork/me-prefill-contact-informatio…
rcaplier Aug 29, 2024
a15b052
set groupId to 0 directly
cmoinier Aug 29, 2024
6aef06d
improve saving function
cmoinier Aug 29, 2024
f22211f
fix linter
cmoinier Aug 29, 2024
e689547
Merge pull request #969 from geonetwork/ME/dashboard-columns
cmoinier Aug 29, 2024
503109c
[me-dh-lib]: Fixtures refactoring (#976)
rcaplier Aug 30, 2024
57608e0
fix(storybook): Fix broken storybook after deploy on main
C2CRomualdCaplier Aug 30, 2024
0925104
Merge pull request #977 from geonetwork/me-fix-broken-storybook-after…
jahow Aug 31, 2024
b5270e0
chore(me): Add some prerequisite documentation.
C2CRomualdCaplier Sep 2, 2024
59fa87a
docs: more info in deploy & prereq, update vitepress
jahow Sep 2, 2024
3a7889a
docs: remove getting-started guide (it was useless)
jahow Sep 2, 2024
d000fb8
Merge pull request #982 from geonetwork/me-add-prerequisite-documenta…
jahow Sep 2, 2024
5f42c31
Merge branch 'main' into datahub-ign-2905
cdebarros Sep 3, 2024
745f682
Configuration API env
cdebarros Sep 3, 2024
11779b9
Configuration API env
cdebarros Sep 3, 2024
0cdde02
Configuration API env
cdebarros Sep 3, 2024
e665299
Configuration API env
cdebarros Sep 3, 2024
acd1b14
Configuration API env
cdebarros Sep 3, 2024
e47559e
Configuration API env
cdebarros Sep 3, 2024
37e4f1f
feat(domain): changed 'distributions' to 'onlineResources' on dataset…
jahow Aug 27, 2024
e548ac6
chore: further renaming distributions->onlineResources across the pro…
jahow Aug 27, 2024
f5e5546
feat(domain): simplify domain a bit further
jahow Aug 27, 2024
da5f164
chore(ui): make SortableElement part of the layout lib
jahow Aug 26, 2024
fe89d16
chore: create online-resource-card component
jahow Aug 26, 2024
a500b61
feat(editor): implement online-resource card
jahow Aug 26, 2024
97340a4
feat(platform): handle attachments
jahow Aug 28, 2024
76926a2
feat(me): introduce attached resources field in record form
jahow Aug 26, 2024
83e3e88
feat(me): adapt & simplify overview form field
jahow Aug 28, 2024
7b260d1
chore: fix typo in i18n
jahow Aug 28, 2024
48bbb3d
chore: i18n
jahow Aug 28, 2024
38553f1
feat(layout): rework sortable-list to use templateOutlet instead of c…
jahow Aug 29, 2024
67810dc
chore: adapt components following sortable-list changes
jahow Aug 29, 2024
97d04c6
feat(layout): introduce modal-dialog component
jahow Aug 30, 2024
cd67792
feat(me): allow modifying resources through modal
jahow Aug 30, 2024
e8c4669
chore(inputs): prevent file open dialog when cancelling upload
jahow Aug 31, 2024
f653712
e2e(me): attached resources field
jahow Sep 1, 2024
48bc42b
chore: post-review fixes
jahow Sep 3, 2024
dfc100e
chore(me): fix the way dates and ranges show up in temporal extents
jahow Sep 3, 2024
f289989
chore: i18n
jahow Sep 3, 2024
6bf675c
chore: add missing translate module
jahow Sep 4, 2024
aa68983
Merge pull request #967 from geonetwork/ME-attached-resources
jahow Sep 4, 2024
076e47e
Configuration API env
cdebarros Sep 4, 2024
f60b198
chore: put max upload size in field config
jahow Sep 4, 2024
cbe86c0
Configuration API env
cdebarros Sep 4, 2024
8acab9d
Configuration API env
cdebarros Sep 4, 2024
2c1f92a
Configuration API env
cdebarros Sep 4, 2024
31b7c8c
Configuration API env
cdebarros Sep 4, 2024
e17a195
Configuration API env
cdebarros Sep 4, 2024
6f312e6
Merge pull request #984 from geonetwork/ME-max-upload-size
jahow Sep 5, 2024
c85edba
test parametrage datahub
cdebarros Sep 5, 2024
d829afa
test parametrage datahub
cdebarros Sep 5, 2024
3ea6f59
test parametrage datahub
cdebarros Sep 5, 2024
08731e7
test parametrage datahub
cdebarros Sep 5, 2024
eb12b4c
test parametrage datahub
cdebarros Sep 5, 2024
511597c
test parametrage datahub
cdebarros Sep 5, 2024
0999eaa
Merge pull request #48 from IGNF/api_telechargement_29
mmohadIGN Sep 5, 2024
a85a76c
Merge branch 'Api_telechargement' into api_telechargement_37
mmohadIGN Sep 5, 2024
f6574eb
test
mmohadIGN Sep 5, 2024
f6569bf
Merge branch 'Api_telechargement' into PR_test
mmohadIGN Sep 5, 2024
4d96741
Merge branch 'datahub-ign-2905' into PR_test
mmohadIGN Sep 5, 2024
fe15d09
fix(merge): adaptation avec les nouvelles libs
mmohadIGN Sep 6, 2024
8aa911a
fix(titleForm): add test if link GPF or not
mmohadIGN Sep 6, 2024
bd65782
Merge branch 'main' into Api_telechargement
mmohadIGN Sep 6, 2024
bfd5848
fix(api-ign): wrong import
mmohadIGN Sep 6, 2024
bf2944b
Merge pull request #55 from IGNF/Api_telechargement
mmohadIGN Sep 6, 2024
29465bb
format rewrite header
cdebarros Sep 6, 2024
0fbf748
chore(ui-inputs): change switch toggle component
Angi-Kinas Sep 2, 2024
6f83425
feat(editor-config): Add configurable values
Angi-Kinas Sep 2, 2024
5cf9f68
feat(editor): add spatial scope to spatial extent
Angi-Kinas Sep 2, 2024
0637dc7
chore(form-field-spatial-extent): add unit tests
Angi-Kinas Sep 2, 2024
5dc5579
chore(e2e): Add e2e for spatial scope
Angi-Kinas Sep 2, 2024
8c9b037
chore(fields): Update keywords in config
Angi-Kinas Sep 3, 2024
e5d2cbe
feat(ui-inputs): Remove value from switch-toggle
Angi-Kinas Sep 3, 2024
29da5ca
chore(spatial-extent): Simplify Observable
Angi-Kinas Sep 9, 2024
8b395cf
Merge pull request #983 from geonetwork/ME-coverage-record-field
Angi-Kinas Sep 9, 2024
ab96de1
fix(npm package): add missing export
tkohr Sep 9, 2024
f4dd051
fix(markdown-parser): do not apply margin for first child/heading
tkohr Sep 9, 2024
909d9cb
chore(keywords): filter out place keyword in
Angi-Kinas Sep 9, 2024
679dab0
fix(e2e): Change keyword search input
Angi-Kinas Sep 9, 2024
80a79ec
Merge pull request #986 from geonetwork/fix-abstract-cutoff
tkohr Sep 9, 2024
95d514b
Filter out spatial scope keywords from the
Angi-Kinas Sep 10, 2024
9075aa6
docs: fix package.json link
jahow Sep 11, 2024
dcc96ff
Merge pull request #987 from geonetwork/ME-filter-out-place-kw
Angi-Kinas Sep 11, 2024
06f63ce
change name of resource update field, now used for two date fields
cmoinier Aug 30, 2024
7a0db1e
add sidebar to edit page
cmoinier Aug 31, 2024
72e325e
polish autocomplete component
cmoinier Aug 31, 2024
41eb4cd
improve styling and translation of keywords input
cmoinier Aug 31, 2024
8ea45b7
polish textarea
cmoinier Aug 31, 2024
be928b5
new classes for gn-ui-btn
cmoinier Aug 31, 2024
088e0c0
diverse spacing and positionning
cmoinier Aug 31, 2024
c362c61
improve about section positionning
cmoinier Sep 2, 2024
dfcb2ea
move additionnal classes to tailwind base
cmoinier Sep 2, 2024
9ce3b87
fix broken unit tests
cmoinier Sep 2, 2024
0dbcd24
fix datahub e2e
cmoinier Sep 2, 2024
3dc97f6
feat(ui): simplify button classes
jahow Sep 6, 2024
50e1ff4
feat(me): better layour for form-field-rich
jahow Sep 6, 2024
28e6a58
chore(ui): add missing css positioning
jahow Sep 6, 2024
908a4a6
feat(me): better form layout, max-width & scroll
jahow Sep 6, 2024
ef44104
feat(me): better layout & colors for page selection buttons
jahow Sep 6, 2024
2c85968
feat(me): file and image input: better buttons & layout, usable with …
jahow Sep 6, 2024
c00cfab
feat(me): improve layout for 'About' block to match mockup
jahow Sep 8, 2024
38303b2
feat(ui): improve date inputs to match other types of inputs
jahow Sep 8, 2024
5623155
feat(ui): improve delete button on badges
jahow Sep 9, 2024
83b0242
feat(me): harmonize add contact buttons, simplify contact list
jahow Sep 9, 2024
4ac94ad
feat(ui): make buttons appear on top when active/hover/focus
jahow Sep 9, 2024
e6fec10
chore(ui): adjust text color in switch toggle
jahow Sep 9, 2024
1d84331
feat(ui): rework autocomplete layout
jahow Sep 11, 2024
4bd1761
chore: misc fixes post review
jahow Sep 11, 2024
d70ea3c
chore: fix e2e
jahow Sep 11, 2024
94713f1
chore(me): move back to container-lg for radability
jahow Sep 12, 2024
344a92f
Merge pull request #981 from geonetwork/ME/polish-ui
jahow Sep 13, 2024
6b26088
feat(me): Create record by duplicating remote record.
C2CRomualdCaplier Sep 5, 2024
575f30f
Merge pull request #985 from geonetwork/me-create-record-by-duplicati…
rcaplier Sep 13, 2024
9034ec3
improve e2e structure
cmoinier Sep 2, 2024
d832bce
wip
cmoinier Sep 5, 2024
0c799a2
add tests for all fields
cmoinier Sep 10, 2024
6029790
cleanup e2e tests for dashboard and actions
cmoinier Sep 10, 2024
f9c85f5
move new test from rebase
cmoinier Sep 10, 2024
33ee40a
e2e: various fixes
LHBruneton-C2C Sep 13, 2024
7e148c7
chore(deps): bump send, @nestjs/platform-express, express and @openap…
dependabot[bot] Sep 17, 2024
97016e3
fix(me/converter): removed the writeOwnerOrganization method which wa…
C2CRomualdCaplier Sep 17, 2024
9b37393
Merge pull request #994 from geonetwork/me-fix-owner-org-handling-in-…
rcaplier Sep 17, 2024
b2e12db
ci: do not run editor E2E on 4.2.2, only on 4.2.5
jahow Sep 17, 2024
7436930
e2e(me): rename commands that are specific to the editor
jahow Sep 17, 2024
540ea1f
e2e(me): fix various test failures, remove redundant tests
jahow Sep 17, 2024
c2a3cdd
Merge pull request #988 from geonetwork/ME/missing-e2e-tests
jahow Sep 17, 2024
86d11dd
Merge pull request #993 from geonetwork/dependabot/npm_and_yarn/multi…
jahow Sep 18, 2024
2a73b73
test(map): add map fixtures
jahow Sep 13, 2024
b7034b3
feat(ui): introduce new map container component, rework others
jahow Sep 15, 2024
0c3b2ac
refactor(map): remove unused components
jahow Sep 15, 2024
85bfef7
refactor(map): rework map state & map-related features
jahow Sep 13, 2024
e50b1a4
refactor(map): further refactoring to use geo sdk
jahow Sep 13, 2024
dcb8a0b
feat(map): make geocoding standalone & use geospatial-sdk properly
jahow Sep 12, 2024
de2c07d
feat(me): migrate spatial-extents map to use geo-sdk
jahow Sep 13, 2024
3b37305
chore: add geospatial-sdk deps
jahow Sep 13, 2024
66308c0
chore: update ogc-client
jahow Sep 15, 2024
f21a87d
disable non implemented btns
cmoinier Sep 18, 2024
c64f943
add translation
cmoinier Sep 18, 2024
d011705
chore: fixes post review
jahow Sep 18, 2024
4d6361d
chore: update geo-sdk again
jahow Sep 18, 2024
dd44d80
docs: add doc on interactive maps
jahow Sep 18, 2024
4992149
Merge pull request #949 from geonetwork/use-geoespatial-sdk-for-maps
jahow Sep 18, 2024
0512152
fix module import in UT
cmoinier Sep 18, 2024
3f2739f
merge main 18 septembre
cdebarros Sep 18, 2024
66a3379
Merge pull request #995 from geonetwork/ME/disable-buttons
cmoinier Sep 19, 2024
0498c36
fix: element ref doesn't work on ng-for wizard.component.html
f-necas Sep 20, 2024
e5f8e61
Merge pull request #996 from geonetwork/fix-wizard-element-ref
f-necas Sep 22, 2024
9736e3d
feat(editor): Added field contacts for metadata
C2CRomualdCaplier Aug 26, 2024
deed6da
wip
C2CRomualdCaplier Aug 29, 2024
770f3ca
fix after rebase
C2CRomualdCaplier Sep 23, 2024
0b997c1
fix after rebase 2
C2CRomualdCaplier Sep 23, 2024
91efa1a
fix(editor): fix-misc-issues-with-dashboard-views
C2CRomualdCaplier Sep 16, 2024
38569e2
feat(my-records): add a myRecords search state
tkohr Sep 20, 2024
b37468a
feat(dashboard-menu): reset main search when navigating to my records…
tkohr Sep 20, 2024
2dd588b
test(my-records): adapt unit tests
tkohr Sep 20, 2024
03473d8
test(e2e): add e2e tests
tkohr Sep 20, 2024
9a33ea8
fix(search-header): update filters on autocomplete selection
tkohr Sep 23, 2024
a5f8b7b
feat(me): fix mutliple identical searchs in the header + simplify
jahow Sep 23, 2024
8b33a3d
feat(me): remove unused icons in header
jahow Sep 23, 2024
4abfaf1
refactor(record-list): remove duplicate code
tkohr Sep 23, 2024
25f5ef6
fix(dashboard): add y autoscroll for table and content
tkohr Sep 23, 2024
7e683b4
fix(search-header): move cross to right
tkohr Sep 23, 2024
f545bc4
fix unit tests
C2CRomualdCaplier Sep 23, 2024
cddc365
refactor(my-records): remove unused method
tkohr Sep 23, 2024
25d27d4
fix code review
C2CRomualdCaplier Sep 24, 2024
14ec2ff
feat(converter): implement DCAT-AP converter with reading ability only
jahow Jul 4, 2024
9a83f87
feat(md-converter): handle DCAT-AP, transform between formats
jahow Jul 4, 2024
70565e0
ci: deploy md-converter app on gh-pages
jahow Jul 2, 2024
66fb168
chore: package-lock
jahow Sep 19, 2024
dba2f7c
fix(me): give original record source when saving it
jahow Sep 19, 2024
17b35a1
feat(me): handle contacts without an org in the form
jahow Sep 20, 2024
9333a85
feat(converter): implement a custom XML output for dcat for GN compat…
jahow Sep 23, 2024
acc3eb9
feat(md-converter): allow ttl, jsonld and n3 files, handle missing ow…
jahow Sep 24, 2024
5eb5f9f
feat(search): separate search inputs for allRecords and myRecords
tkohr Sep 24, 2024
197304c
feat(search): navigate to record on autocomplete select
tkohr Sep 24, 2024
a6f7825
feat(converter): allow clearing dates on iso schemas, better logic & …
jahow Sep 24, 2024
ce0c151
feat(converter): make sure mandatory fields are filled in DCAT records
jahow Sep 24, 2024
d8df3f0
feat(converter): improve contacts writing in ISO
jahow Sep 24, 2024
4219ecc
chore: fix tests
jahow Sep 24, 2024
614b0d9
Merge pull request #932 from geonetwork/semantic-converter
jahow Sep 25, 2024
54cc287
test(search): add and adapt tests
tkohr Sep 25, 2024
5732e95
Merge pull request #1003 from geonetwork/seperate-search-inputs
tkohr Sep 25, 2024
a363ffa
fix(search): address review comments
tkohr Sep 25, 2024
df28ed3
fix(me): correct typos and grammatical errors in the French translati…
C2CRomualdCaplier Sep 25, 2024
ac0f1dd
fix(badge): adapt dashboard badge font sizes and padding
tkohr Sep 25, 2024
90201e2
fix: correct typos and grammatical errors in the English translation …
C2CRomualdCaplier Sep 25, 2024
d3529f0
Merge pull request #974 from geonetwork/me-record-field-contacts-for-…
rcaplier Sep 25, 2024
0f4306d
Update communication options for geonetwork-ui
jodygarnett Sep 26, 2024
31aad0f
chore(all/myrecords): grey out unimplemented buttons
tkohr Sep 26, 2024
4c45974
docs: improve root README a bit more
jahow Sep 26, 2024
f501972
Merge pull request #990 from geonetwork/me-fix-misc-issues-with-dashb…
tkohr Sep 26, 2024
43f0d6f
docs: improve project introduction, mention communication channels
jahow Sep 26, 2024
4892c30
Merge pull request #1005 from geonetwork/forum
jahow Sep 26, 2024
9817a80
feat(me): redirect to login if needed
jahow Sep 26, 2024
c95043b
docs: mention xsrf issue in faq
jahow Sep 26, 2024
be95197
Merge pull request #1006 from geonetwork/me-redirect-to-login
jahow Sep 26, 2024
84ef5d8
feat(editor): record distribution as online resources
LHBruneton-C2C Sep 26, 2024
177e6ab
e2e(me): fix edit test
jahow Sep 30, 2024
fdf8f64
Merge pull request #1002 from geonetwork/ME/record-field-distributions
jahow Sep 30, 2024
b85e6b1
ajout filtre organization
cdebarros Sep 30, 2024
74fab3f
Merge branch 'main' into datahub-ign-2905
cdebarros Sep 30, 2024
1329102
feat(formapi): Ajout d'une fenêtre modale pour la partie de télécharg…
Naminoshin Oct 7, 2024
13a8211
feat(formapi): Finalisation de la fenêtre modale lorsque l'on appuis …
Naminoshin Oct 8, 2024
d37aa48
feat(formapi): Modification de la denêtre modale
Naminoshin Oct 8, 2024
3b00b75
feat(formapi): Nettoyage du code
Naminoshin Oct 9, 2024
a35ddcc
feat(MapModal): Ajout d'une modale lors d'un sur la partie télécharge…
Naminoshin Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"plugins": ["@nx", "no-only-tests"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand Down Expand Up @@ -73,6 +73,12 @@
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.cy.ts"],
"rules": {
"no-only-tests/no-only-tests": "error"
}
}
]
}
6 changes: 2 additions & 4 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.checks.outputs.ref }} # use the PR head ref if applicable; otherwise keep default behaviour
persist-credentials: false
Expand All @@ -57,9 +57,7 @@ jobs:
cache: 'npm'

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'main'
uses: nrwl/nx-set-shas@v3

- name: Install dependencies
run: npm ci
Expand Down
58 changes: 35 additions & 23 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand All @@ -38,9 +38,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'main'
uses: nrwl/nx-set-shas@v3
- run: npm ci
- run: npx nx format:check
- run: npx nx affected -t lint --parallel=3
Expand Down Expand Up @@ -79,7 +77,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand All @@ -89,9 +87,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'main'
uses: nrwl/nx-set-shas@v3
- run: npm ci
- run: npx nx affected -t build --parallel=3

Expand All @@ -102,7 +98,7 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand Down Expand Up @@ -142,38 +138,54 @@ jobs:
comment_tag: build-options
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cypress-run:
name: End-to-end tests
e2e-run:
name: E2E tests / ${{ matrix.app }} / GN v${{ matrix.gn_version }}
runs-on: ubuntu-latest
outputs:
screenshotsUrl: ${{ steps.upload-screenshots.outputs.artifact-url }}
strategy:
fail-fast: false
matrix:
gn_version: [4.2.2, 4.2.8, 4.4.0]
app: [datahub, metadata-editor]
exclude:
- gn_version: 4.2.2 # metadata-editor requires v4.2.5+
app: metadata-editor
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3

- name: Create pipeline docker image
run: cd tools && docker build . -f pipelines/Dockerfile -t geonetwork/geonetwork-ui-tools-pipelines:latest
working-directory: tools
run: docker build . -f pipelines/Dockerfile -t geonetwork/geonetwork-ui-tools-pipelines:latest

- name: Build the backend
run: sudo docker-compose -f support-services/docker-compose.yml up -d init
- name: Start up backend support services
env:
GEONETWORK_VERSION: ${{ matrix.gn_version }}
working-directory: support-services
run: docker compose up --quiet-pull init

- name: Install dependencies
run: |
npm ci
- run: npm ci

- name: Run tests
run: npx nx run-many --target=e2e
- name: Run e2e tests for ${{ matrix.app }}
env:
APP: ${{ matrix.app }}
run: npx nx e2e "$APP-e2e"

- uses: actions/upload-artifact@v4
if: always()
id: upload-screenshots
with:
name: cypress-screenshots
name: cypress-screenshots-app-${{ matrix.app }}-gn-${{ matrix.gn_version }}
path: |
apps/datahub-e2e/cypress/screenshots/**/*
apps/metadata-editor-e2e/cypress/screenshots/**/*
Expand All @@ -193,7 +205,7 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,33 @@ jobs:
comment_tag: github-links
pr_number: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

apps:
needs: checks
if: github.event_name != 'issue_comment'
name: Deploy Apps to GitHub Pages
runs-on: ubuntu-latest
env:
BRANCH_NAME: main

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install
run: npm ci

- name: Build metadata-converter
run: npx nx build metadata-converter --prod

- name: Deploy to directory ${{ env.BRANCH_NAME }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
npx gh-pages --dist dist/apps/ --dest ${{env.BRANCH_NAME}} --remove "${{env.BRANCH_NAME}}/**" --no-history --repo "https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Npm install
run: npm install
- name: npx build
run: npx nx build datahub --base-href=/catalogue/
run: npx nx build datahub --base-href=/catalogue/ --skip-nx-cache

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/webcomponents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.checks.outputs.ref }}
persist-credentials: false
Expand Down
109 changes: 9 additions & 100 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,15 @@

# GeoNetwork UI

GeoNetwork UI is a suite of Applications made to provide a modern facade to your GeoNetwork 4 catalog.
GeoNetwork-UI provides several applications to improve the user experience of your GeoNetwork catalog.

It also provides Web Components to embed various parts of your data catalog in third party websites.

## Documentation
End users are [invited](https://discourse.osgeo.org/t/about-the-geonetwork-ui-category/59280) to join us on the GeoNetwork-UI forum on OsGeo Discourse: https://discourse.osgeo.org/c/geonetwork/ui

To check out docs, visit [geonetwork-ui website](https://geonetwork.github.io/geonetwork-ui/main/docs/)
Developers should check out the [GitHub discussions](https://github.com/geonetwork/geonetwork-ui/discussions).

## Requirements

- GeoNetwork version 4.2.2
- ElasticSearch version 7.11+

:warning: A bug currently in GeoNetwork 4.2.2 prevents the organizations of showing up correctly in the Datahub application.

As a temporary workaround, the following change is necessary in GeoNetwork data directory:

```diff
diff --git a/web/src/main/webResources/WEB-INF/data/config/index/records.json b/web/src/main/webResources/WEB-INF/data/config/index/records.json
index 1d7e499af7..78e682e3db 100644
--- a/web/src/main/webResources/WEB-INF/data/config/index/records.json
+++ b/web/src/main/webResources/WEB-INF/data/config/index/records.json
@@ -1317,7 +1317,7 @@
"mapping": {
"type": "nested",
"properties": {
- "org": {
+ "organisation": {
"type": "keyword"
},
"role": {
```
To learn more about the project, visit the [GeoNetwork-UI website](https://geonetwork.github.io/geonetwork-ui/main/docs/)

## Getting started

Expand Down Expand Up @@ -99,67 +76,6 @@ npx nx build (app_name)

The build artifacts will be stored in the `dist/` directory. Note: this always produces a production build.

### A word on authentication

GeoNetwork-UI applications rely on the GeoNetwork authentication mechanism. This means that if the user is authenticated in GeoNetwork, they will have access to authenticated features in the corresponding GeoNetwork-UI apps.

There are a few caveats, depending on the deployment scenario:

#### 1. GeoNetwork and GeoNetwork-UI are deployed on the same host, e.g. https://my.host/geonetwork and https://my.host/datahub

In this scenario, requests from the GeoNetwork-UI app to GeoNetwork are _not_ [cross-origin requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#what_requests_use_cors), so CORS rules do not apply.

GeoNetwork has an XSRF protection by default, which _will_ make authenticated requests fail unless the following is done:

- either make sure that the XSRF cookies sent by GeoNetwork have a `path` value of `/`; this is typically done like so in GeoNetwork:

```diff
--- a/web/src/main/webapp/WEB-INF/config-security/config-security-core.xml
+++ b/web/src/main/webapp/WEB-INF/config-security/config-security-core.xml
@@ -361,6 +361,7 @@
<bean class="org.fao.geonet.security.web.csrf.CookieCsrfTokenRepository"
id="csrfTokenRepository">
<property name="cookieHttpOnly" value="false"/>
+ <property name="cookiePath" value="/"/>
</bean>
```

Also make sure that the GeoNetwork API URL used by the application is _not_ an absolute URL; a relative URL should be enough in that scenario:

```diff
--- a/conf/default.toml
+++ b/conf/default.toml
@@ -5,7 +5,7 @@
[global]
-geonetwork4_api_url = "https://my.host/geonetwork/srv/api"
+geonetwork4_api_url = "/geonetwork/srv/api"
```

- or disable the XSRF protection selectively for non-critical endpoints of GeoNetwork, e.g. https://my.host/geonetwork/srv/api/userSelections for marking records as favorites; this is typically done like so in GeoNetwork:

```diff
--- a/web/src/main/webapp/WEB-INF/config-security/config-security-core.xml
+++ b/web/src/main/webapp/WEB-INF/config-security/config-security-core.xml
@@ -374,6 +374,9 @@
<value>/[a-zA-Z0-9_\-]+/[a-z]{2,3}/csw!?.*</value>
<value>/[a-zA-Z0-9_\-]+/api/search/.*</value>
<value>/[a-zA-Z0-9_\-]+/api/site</value>
+ <value>/[a-zA-Z0-9_\-]+/api/userselections.*</value>
</set>
</constructor-arg>
</bean>
```

:warning: Please do this responsibly as this could have security implications! :warning:

#### 2. GeoNetwork and GeoNetwork-UI are _not_ deployed on the same host, e.g. https://my.host/geonetwork and https://another.org/datahub

In this scenario, even if CORS settings are correctly set up on GeoNetwork side, most authenticated request will probably fail because by default they are not sent with the [`withCredentials: true`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials) option.

As such, **authenticated requests are not yet supported in GeoNetwork-UI in the case of a cross-origin deployment**; non-authenticated requests (e.g. public search) should still work provided CORS settings were correctly set up on the GeoNetwork side (see [CORS resonse headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers)).

Lastly, even if authenticated requests were cleared regarding CORS rules, it would still be needed to disable the XSRF mechanism for the endpoints that GeoNetwork-UI relies on; XSRF protections works by making the client read the content of an HTTP cookie, and that is forbidden in a cross-origin context

### Tests

#### Unit tests
Expand All @@ -183,31 +99,24 @@ npx nx test --test-match=/data/dev/gn/ui/libs/common/src/lib/services/bootstrap.

#### End-to-end-tests

You can test the datahub app by page :

- home page
- search page
- organisations page
- dataset pages

##### To run the tests with the interface :
##### To run the tests with the interface:

Start docker from 'support-services', and then in the 'geonetwork-ui' folder :
Start docker from 'support-services', and then in the project root folder :

```shell script
npx nx e2e appname --watch
npx nx e2e (app_name) --watch
```

Then select the file(s) you want to test in the interface.

##### To run the tests without interface :

Start docker from 'support-services', and then in the 'geonetwork-ui' folder :
Start docker from 'support-services', and then in the project root folder :

--> ALl tests :

```shell script
npx nx e2e appname
npx nx e2e (app_name)
```

## Project structure
Expand Down
6 changes: 6 additions & 0 deletions apps/datafeeder/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { PublicationLockGuard } from './router/publication-lock.guard'
import { PublicationStatusGuard } from './router/publication-status.guard'
import { UploadProgressGuard } from './router/upload-progress.guard'
import { UploadStatusGuard } from './router/upload-status.guard'
import { DatasetValidationCsvPageComponent } from './presentation/pages/dataset-validation-csv-page/dataset-validation-csv-page'

const routes: Routes = [
{ path: '', component: UploadDataPageComponent },
Expand All @@ -24,6 +25,11 @@ const routes: Routes = [
component: DatasetValidationPageComponent,
canActivate: [UploadStatusGuard, PublicationLockGuard],
},
{
path: ':id/validation-csv',
component: DatasetValidationCsvPageComponent,
canActivate: [UploadStatusGuard, PublicationLockGuard],
},
{
path: ':id/step/:stepId',
component: FormsPageComponent,
Expand Down
Loading
Loading