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

Externalise Proxy targetUri init parameter #35

Closed
wants to merge 583 commits into from

Conversation

juanluisrp
Copy link
Member

fxprunayre and others added 30 commits February 15, 2022 07:16
Remove unused web-ui-docs module (grunt security update needed).
For subtemplate we don't query the search service first so we don't have the corresponding index object. Still use the internal id for now.
* Add actions to manage record dropdown button (record view - indexation and selection)

* Manage record / add add to selection and index actions.

 * Index action API is only allowed for admin
 * Move index action to the bottom / it should be rarely used
 * Refactor selection action to reuse gnSelectionMd directive
 * Use s101 bucket when loading record view to get the selection status of the record we display
 * Remove useless ng-scope class

* Manage record / add add to selection and index actions.

No need to reload selectedCount on location change.

Co-authored-by: davinciagf <arnaud.degroof@spacebel.be>
See georchestra/georchestra#3629 for the
motivation behind this change.

Tests: runtime into a tomcat servlet container, touch'ing web.xml from
GN do not produce the stacktrace about jmx mbeans anymore, and the
webapp successfully redeploys itself.
When loading more buckets, the filter was not took into account.
Currently same base query was used to search for records and directory entries. In most cases, directory is used for contact and organisation and the default base query may not be a good choice for such search. Language analysis is not really necessary for individual names.

This adds the possibility to customize the search for directory search and by default add some kind of fuzziness for not exact match/typo while boosting exact match. This sounds more relevant than using '*' like in GN3.
Not sure why it was not able. Simple export/import looks to work well.
Do not display build collection menu for subtemplates. it does not apply.
This makes sense when a db search and replace or an xpath is not matching any element, so record is processed but unchanged.
No need to request aggregation on page change or sort change. This should improve performances ...
eg. map > add layer > from WFS service http://www.ifremer.fr/services/wfs/nouvelle_caledonie?SERVICE=WFS&REQUEST=GetCapabilities

Will make a query
http://www.ifremer.fr/services/wfs/nouvelle_caledonie?service=WFS&request=GetFeature&version=1.1.0&srsName=EPSG:3857&typeName=:IFR_NEW_CAL_Q2_ZONES_MARINES_NC_RGNC
which fails with `TypeName ':IFR_NEW_CAL_Q2_ZONES_MARINES_NC_RGNC' unknow`

Note: there is also a weird check for //Fix, ArcGIS fails if there is a bbox:
Use the base URL for correct redirect.
Follow titellus@cced47b

'Org', 'OrgForResource', 'OrgForDistribution' are the main index field than can be used but some users may want to be more precise by defining a role eg. 'pointOfContactOrgForResource'. Allow free text and suggest default choices.
fxprunayre and others added 29 commits May 19, 2022 11:13
* Associated resources / Avoid JS errors on dublin core records
* Missing translation key
* Record view / Add space after association
* Cleaning / Unused code.
… identifier of the working copy when a metadata has a working copy (geonetwork#6321)

* Update edit button to use the working copy metadata identifier when a metadata has a working copy

* Update edit button to use the working copy metadata identifier when a metadata has a working copy - refactor

* Fix the metadata detail page code to display the non-draft version when the results include the approved and the working copy (draft) versions, and  it is requested the non-draft version
When harvester use a logo not in PNG format, the logo URL is wrong.
Set the logo in the source entity (like for portal).
Add XSL utility to get the source logo properly.
When the record is draft, simply add the label to the edit button.
JSON Harvester / Add XSL transformation for harvesting DKAN catalogs
* Record view / Associated resources / Group by type.

More and more record are linking to remote resources (eg. documents, datasets, oceanographic cruises, sensors). This adds the possibility to group associated resources by types.

* Update RelatedDirective.js.
Affected by geonetwork@4b1cfae scale prefix depending on language was missing.
When adding new link, if the current record contains empty (ie. no url, no name, no protocol) then the updateKey used for updating a link trigger insertion of the added link in those empty element.

Checking that the updateKey is not empty to add the link once and in the correct position.
* Aggregations / Add support for terms missing value

In order to easily find records which does not contain a value for a field, an aggregation can be configured using the missing value of terms aggregation. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_missing_value_5

The missing value is used for the bucket label.

The query use `_exist_:fieldName`.

Sample configuration:

```
    "th_eea-topics.default": {
      "terms": {
        "field": "th_eea-topics.default",
        "size": 15,
        "missing": "- Not categorized -",
        "order" : { "_key" : "asc" }
      }
    },

```

* Fix indentation.

* Home / Statistics / Create directive for facet as cards.
* Sharing / Who can publish?

Test:
* Create Group A, Group B
* Create User 1, Editor in Group A, Reviewer in Group B
* Create new record in Group A
* Allow editing to Group B
* Connect as User 1
 * Privileges popup allows checking All/Intranet/Guest groups but API will skip them (see https://github.com/geonetwork/core-geonetwork/blob/main/services/src/main/java/org/fao/geonet/api/records/MetadataSharingApi.java#L271-L272)

Some API call returns
```
"description": "User not allowed to publish the metadata 127. You need to be administrator, or reviewer of the metadata group or reviewer with edit privilege on the metadata."
```
See geonetwork@36a2a58

Privileges management popup check if user is Reviewer in groupOwner or in groups with editing allowed (see
https://github.com/geonetwork/core-geonetwork/blob/main/web-ui/src/main/resources/catalog/components/common/share/ShareService.js#L67-L98)

So we are balanced between 2 mechanisms for defining who can publish to all:
* administrator, or reviewer of the metadata group
* administrator, or reviewer of the metadata group or reviewer with edit privilege on the metadata

Adding a settings for defining those 2 modes.

* Search / Add required source field needed for userInfo

Adding id/groupOwner/owner required for userInfo processing.
If source is null, then all fields are returned. So it works fine.
See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering.

* Remove unused method applyRulesForStatusChange
…#6334)

* Use multilingual texts in metadata sharing API exceptions

* Add additional exception text translated

* API / Sharing API / Multilingual text / Improve French (#34)

Co-authored-by: Jose García <josegar74@gmail.com>

* Update French text

Co-authored-by: François Prunayre <fx.prunayre@gmail.com>
* Add inline messages for the add feedback form

* Fix path for angular-messages.min.js

Co-authored-by: Jose García <josegar74@gmail.com>
…ude unrequired fields when the user is logged. Hiding the fields trigger the validation, it is required to use data-ng-if directive instead of data-ng-hide (geonetwork#6346)
The targetUri property of proxyURITemplateProxyServlet can be now defined externally to web.xml
in case the value stored there is empty.
The lookup order in that case would be:
1. Environment variable
2. System Property
3. Property in config.properties

The mechanism is similar to the one used to set the data directory, looking first for properties
prefixed by the web application name and the servlet name in web.xml and if nothing is found using
geonetwork as application name.
@juanluisrp juanluisrp closed this Jun 8, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment