Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/ec-jrc/re3gistry into de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
unaibrrgn committed Sep 22, 2023
2 parents 8d78c42 + 3aa25ef commit 43feaa8
Show file tree
Hide file tree
Showing 12 changed files with 124 additions and 36 deletions.
11 changes: 11 additions & 0 deletions documentation/administrator-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,17 @@ The software has an engine that automatically creates the cache for all the elem
curl --noproxy localhost -i -X GET http://localhost:8080/re3gistry2restapi/cacheall
```

### Swagger OpenAPI interactive UI

To access the swagger openapi interactive interface you will have to change the parameters
found in the [docker-compose](https://github.com/ec-jrc/re3gistry/blob/develop/sources/Re3gistry2-build-helper/docker-compose.yml) file. The default value and ports for the UI are
localhost:8082.

The frontend and backend interfaces both have a "Access API" hyperlink on the footer element. These links point to the default swagger URL, you might have to change it afterwards.

You can manually add, edit and remove some of the options of the openapi interface by editing
the existing [openapi.json](https://github.com/ec-jrc/re3gistry/blob/develop/sources/Re3gistry2-build-helper/swagger/openapi.json) file.

### Changing error messages

You can change how the error messages are shown in your Re3gistry local instance.
Expand Down
2 changes: 1 addition & 1 deletion sources/Re3gistry2-build-helper/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
# Test database to use it without installation
# Be sure file sources-main/resources-configurations_files/system.installed
# is removed from the war file. If not, installation will be not detected.
- ../../dist/customize-interface/example-profile-developer-docker/dump-docker-202205180929.sql:/docker-entrypoint-initdb.d/init_backup.sql
# - ../../dist/customize-interface/example-profile-developer-docker/dump-docker-202205180929.sql:/docker-entrypoint-initdb.d/init_backup.sql
# login example db: [email protected] password
expose:
- "5432"
Expand Down
22 changes: 11 additions & 11 deletions sources/Re3gistry2-build-helper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
<properties>
<profile.id>developer-docker</profile.id>
<persistence.db.port>5432</persistence.db.port>
<persistence.db.address>host.docker.internal</persistence.db.address>
<persistence.db.name>registrydb</persistence.db.name>
<persistence.jdbc.username>name</persistence.jdbc.username>
<persistence.jdbc.password>password</persistence.jdbc.password>
<persistence.db.address>DB_ADDRESS</persistence.db.address>
<persistence.db.name>re3gistry2_dev</persistence.db.name>
<persistence.jdbc.username>DB_USERNAME</persistence.jdbc.username>
<persistence.jdbc.password>DB_PASSWORD</persistence.jdbc.password>
<persistence.jdbc.url>jdbc:postgresql://${persistence.db.address}:${persistence.db.port}/${persistence.db.name}</persistence.jdbc.url>
<application.login.provider>SHIRO</application.login.provider>
<application.rooturl>http://localhost/re3gistry2/</application.rooturl>
Expand All @@ -67,13 +67,13 @@
<application.logging.path>work/registrylogger.log</application.logging.path>
<application.privacy>OFF</application.privacy>
<application.selected.interface>ecl</application.selected.interface>
<mail.smtp.host>localhost</mail.smtp.host>
<mail.smtp.port>2500</mail.smtp.port>
<mail.smtp.host>example-smtp.eu</mail.smtp.host>
<mail.smtp.port>25</mail.smtp.port>
<mail.smtp.auth>false</mail.smtp.auth>
<mail.smtp.starttls.enable>false</mail.smtp.starttls.enable>
<mail.user>name</mail.user>
<mail.password>password</mail.password>
<mail.sender>admin@example.com</mail.sender>
<mail.smtp.starttls.enable>true</mail.smtp.starttls.enable>
<mail.user></mail.user>
<mail.password></mail.password>
<mail.sender>sender@example.eu</mail.sender>
<web.session.cookie.secure>false</web.session.cookie.secure>
<application.selected.interface>neutral</application.selected.interface>
<application.legacy.flag>ON</application.legacy.flag>
Expand Down Expand Up @@ -145,4 +145,4 @@
</properties>
</profile>
</profiles>
</project>
</project>
12 changes: 9 additions & 3 deletions sources/Re3gistry2-build-helper/swagger/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"openapi": "3.0.0",
"info": {
"title": "Re3gistry2 API",
"description": "Re3gistry2 API",
"description": "Welcome to the Re3gistry2 Swagger API interactive documentation. In this tool you will be able to try and interact with the different endpoints and API procedures of the application. For a deeper understanding on the behaviour of the API and how to use it you can consult the different <a href='https://github.com/ec-jrc/re3gistry/tree/master/documentation'>documentation manuals</a>. Any issues and questions can be reported in the <a href='https://github.com/ec-jrc/re3gistry'>Re3gistry2 GitHub repository</a>.",
"contact": {
"name": "JRC Registry team",
"url": "https://github.com/ec-jrc/re3gistry"
},
"version": "2.4.2"
"version": "2.5.0"
},
"servers": [
{
Expand All @@ -21,12 +21,13 @@
"/rest": {
"description": "Register and item resources",
"get": {
"description": "Fetch Register or Item",
"description": "Fetch a Register or Item",
"parameters": [
{
"in": "query",
"name": "uri",
"required": false,
"description": "Uniform Resource Identifier",
"schema": {
"type": "string"
}
Expand All @@ -35,6 +36,7 @@
"in": "query",
"name": "uuid",
"required": false,
"description": "Unique Item Identifier",
"schema": {
"type": "string"
}
Expand All @@ -43,6 +45,7 @@
"in": "query",
"name": "lang",
"required": false,
"description": "Language that content is returned in",
"schema": {
"type": "string",
"example": "en"
Expand All @@ -52,6 +55,7 @@
"in": "query",
"name": "format",
"required": false,
"description": "Format of the returned content",
"schema": {
"type": "string",
"example": "jsonc"
Expand All @@ -61,6 +65,7 @@
"in": "query",
"name": "status",
"required": false,
"description": "Acceptance status of the returned Items",
"schema": {
"type": "string",
"example": "proposed"
Expand All @@ -69,6 +74,7 @@
{
"in": "query",
"name": "itemclass",
"description": "Type of the returned item",
"required": false,
"schema": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,21 +656,28 @@
</div>
</div>
</div>
<div class="modal-footer">
<div id="browseLoaderModalFooter" class="modal-footer">
<div class="col-sm-6">
<button type="reset" class="btn btn-danger width100"><i class="fas fa-sync-alt"></i> ${localization.getString("reset")}</button>
</div>
<div class="col-sm-6">
<button type="submit" class="btn btn-primary width100">
<button id="btnStartBulkImport" type="submit" class="btn btn-primary width100">
<i class="fas fa-upload"></i> ${localization.getString("label.start.bulkimport")}
</button>
</div>
<script>
$(document).on('click', '#btnStartBulkImport', function (e) {
$('#bufferLoader').html('<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>');
});
</script>

</div>

</div>
<div id="bufferLoader"></div>
</div>
</form>
</div>
</div>

</div>
<% } else { %>
<div class="col-sm-6"></div>
<%}%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
${properties.getProperty('application.default.name')} management
</div>
<ul class="ecl-footer-standardised__list ecl-footer-standardised__list--inline">
<li class="ecl-footer-standardised__list-item"><a href="https://inspire-sandbox.jrc.ec.europa.eu/registry/api.html" class="ecl-footer-standardised__link ecl-link ecl-link--standalone">Access API</a></li>
<li class="ecl-footer-standardised__list-item"><a href="http://localhost:8082/" class="ecl-footer-standardised__link ecl-link ecl-link--standalone">Access API</a></li>
<li class="ecl-footer-standardised__list-item"><a href="${properties.getProperty('application.default.frontend.link')}" class="ecl-footer-standardised__link ecl-link ecl-link--standalone">Go to public interface</a></li>
</ul>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<!DOCTYPE html>
<html lang="${localization.getString("property.localeid")}" role="document">
<%@include file="includes/head.inc.jsp" %>
<link rel="stylesheet" href="res/css/css-loader.css">
<body>
<%@include file="includes/header.inc.jsp"%>

Expand Down Expand Up @@ -129,7 +130,7 @@
<h5 class="card-title"></h5>
<p class="card-text">${localization.getString("label.solrdescription")}</p>
<% if (SolrHandler.checkSolrCompleteIndexinglRunning()) { %>
<p class="card-text mt-3 alert alert-warning">${localization.getString("label.solrrunning")}</p>
<div class="card-text mt-3 alert alert-warning"><p>${localization.getString("label.solrrunning")}</p> <div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div> </div>
<% } else {%>
<a id="startSolrIndexing" class="btn btn-primary btn-md<%=buttonDisabled%>" href="?<%=BaseConstants.KEY_REQUEST_STARTINDEX%>=<%=BaseConstants.KEY_BOOLEAN_STRING_TRUE%>" role="button">${localization.getString("label.solrstartindexing")}</a>
<script>
Expand Down Expand Up @@ -157,8 +158,9 @@
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text">${localization.getString("label.cachingdescription")}</p>
<% if (CacheHelper.checkCacheCompleteRunning()) { %>
<p class="card-text mt-3 alert alert-warning">${localization.getString("label.cacheallrunning")}</p>
<% if (CacheHelper.checkCacheCompleteRunning()) {
%>
<div class="card-text mt-3 alert alert-warning"><p>${localization.getString("label.cacheallrunning")}</p> <div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div> </div>
<% } else {%>
<div class="row">
<div class="col-sm-4">
Expand Down
64 changes: 64 additions & 0 deletions sources/Re3gistry2/src/main/webapp/res/css/css-loader.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/CascadeStyleSheet.css to edit this template
*/
/*
Created on : 08-sep-2023, 9:45:16
Author : ubarrigon
*/
.lds-ellipsis {
display: flex;
position: relative;
width: 80px;
height: 80px;
margin: 0 auto;
}
.lds-ellipsis div {
position: absolute;
top: 33px;
width: 13px;
height: 13px;
border-radius: 50%;
background: #ccc;
animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
left: 8px;
animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
left: 8px;
animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
left: 32px;
animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
left: 56px;
animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes lds-ellipsis3 {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes lds-ellipsis2 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(24px, 0);
}
}
6 changes: 3 additions & 3 deletions sources/Re3gistry2Base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>1.10.0</version>
<version>1.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down Expand Up @@ -113,7 +113,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20211205</version>
<version>20230227</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
Expand Down
2 changes: 1 addition & 1 deletion sources/Re3gistry2JavaAPI/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.4.1</version>
<version>2.13.4.2</version>
</dependency>


Expand Down
10 changes: 5 additions & 5 deletions sources/Re3gistry2ServiceWebapp/public_html/conf/conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ registryApp.errorMessageURL = "https://github.com/ec-jrc/re3gistry";
registryApp.backendURL = "//localhost:8080/re3gistry2";

// The app's base URL
registryApp.hostURL = '//host.docker.internal/registry';
registryApp.searchURL = '//host.docker.internal/registry/search';
registryApp.searchApiURL = '//host.docker.internal/registry/searchapi';
registryApp.staticResourcesPath = '/ecl-v2/static/media/';
registryApp.dataServiceURL = '//host.docker.internal/registry/rest';
registryApp.domainURL = '//registry-test.eu';
registryApp.hostURL = '//registry-test.eu/registry';
registryApp.searchURL = '//registry-test.eu/registry/search';
registryApp.searchApiURL = '//registry-test.eu/registry/searchapi';
registryApp.dataServiceURL = '//registry-test.eu/registry/rest';

4 changes: 1 addition & 3 deletions sources/Re3gistry2ServiceWebapp/public_html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,13 @@

</head>
<body>

<!--just for sandbox-integration-preproduction-->
<!-- <div class="ecl-message ecl-message--info" style="padding-bottom: 0.1em; padding-top: 0.5em" data-ecl-message="" role="alert" data-ecl-auto-init="Message">
<div class="ecl-message__content" style="text-align: center">
<div class="ecl-message__title" style="max-width: 100%">Re3gistry – sandboxing Instance – frontend view</div>
<div class="ecl-message__title" style="max-width: 100%">Access the admin panel <a class="ecl-link" href="https://inspire-sandbox.jrc.ec.europa.eu/re3gistry">here</a></div>
</div>
</div> -->

<header class="ecl-site-header" data-ecl-site-header="true" data-ecl-auto-init="SiteHeader">
<div class="ecl-site-header__container ecl-container">
<div class="ecl-site-header__banner">
Expand Down Expand Up @@ -176,7 +174,7 @@ <h2 class="ecl-u-type-heading-2 ecl-u-mt-none ecl-u-mb-l" id="page-title">Regist
Re3gistry API
</div>
<ul class="ecl-footer-standardised__list ecl-footer-standardised__list--inline">
<li class="ecl-footer-standardised__list-item"><a href="registry/api.html" class="ecl-footer-standardised__link ecl-link ecl-link--standalone">Access API</a></li>
<li class="ecl-footer-standardised__list-item"><a href="http://localhost:8082/" class="ecl-footer-standardised__link ecl-link ecl-link--standalone">Access API</a></li>
<li class="ecl-footer-standardised__list-item"><a href="" class="ecl-footer-standardised__link ecl-link ecl-link--standalone backend-link">Enter admin interface</a></li>
</ul>
</section>
Expand Down

0 comments on commit 43feaa8

Please sign in to comment.