Skip to content

Conversation

f-necas
Copy link
Contributor

@f-necas f-necas commented Oct 6, 2025

This PR adds the wc-embedder inside datahub plugin in order to do like gn-ui docker's image.
https://github.com/geonetwork/geonetwork-ui/blob/main/tools/docker/Dockerfile.apps#L18

It allows to staty inside sub-portals context for sharing

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@jahow
Copy link
Member

jahow commented Oct 6, 2025

Thanks, for clarity this is the documentation about the web component "embedder": https://geonetwork.github.io/geonetwork-ui/main/docs/guide/webcomponents.html#html-embedder

@f-necas I guess we could add a link to this embedder in the default Datahub config?

@f-necas
Copy link
Contributor Author

f-necas commented Oct 9, 2025

@jahow added in readConfiguration in order to take portal name in account

Copy link
Member

@jahow jahow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks!

Comment on lines +191 to +192
"geonetwork4_api_url = \"/geonetwork/" + portalName + "/api\"\n" +
"web_component_embedder_url = \"/geonetwork/" + portalName + "/datahub/wc-embedder.html\"");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that this code assumes that Geonetwork is deployed on the /geonetwork/ context. This is not right and can break in some use cases.

@jahow jahow merged commit 26320ad into geonetwork:main Oct 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants