diff --git a/agrold-javaweb/README.md b/agrold-javaweb/README.md index 475654a..f0d981d 100755 --- a/agrold-javaweb/README.md +++ b/agrold-javaweb/README.md @@ -21,15 +21,13 @@ Vous pourrez voir comment paramétrer votre IDE dans [la section appropriée sur Le déploiement de l'application se fait premièrement avec des propriétés Java passées à tomcat. -| Name | Description | Valeur par défaut | -| :------------------------: | :------------------------------------------------------------------------: | :---------------------------: | -| `agrold.description` | Description affichée dans Tomcat | :x: | -| `agrold.sparql_endpoint` | Url de l'endpoint SPARQL | `http://sparql.southgreen.fr` | -| `agrold.db_connection_url` | Url de la base de données ex: `[host]:[port]/[db]?[opt]` | :x: | -| `agrold.db_username` | Utilisateur de la base de données | :x: | -| `agrold.db_password` | Mot de passe de la base de données | :x: | -| `agrold.rf_link` | Lien vers une instance de RelFinder[Reformed] | `http://rf.southgreen.fr/` | -| `agrold.instance` | Specifies the type of the instance, can either be empty or `dev` | :x: | +| Name | Description | Valeur par défaut | +| :-------------------------: | :--------------------------------------------------------------: | :-------------------------------: | +| `agrold.description` | Description affichée dans Tomcat | :x: | +| `agrold.sparql_endpoint` | Url de l'endpoint SPARQL | `http://sparql.southgreen.fr` | +| `agrold.rf_link` | Lien vers une instance de RelFinder[Reformed] | `http://rf.southgreen.fr/` | +| `agrold.faceted_search_url` | Lien vers la recherche à facettes | `http://agrold.southgreen.fr/fct` | +| `agrold.instance` | Specifies the type of the instance, can either be empty or `dev` | :x: | Pour injecter ces variables dans tomcat, il faut déclarer les sous forme d'argument en ligne de commande sous cette forme `-Dnomdelapropriété=valeur` et les placer dans la variable d'environnement `CATALINA_OPTS` diff --git a/agrold-javaweb/charts/agrold-javaweb/README.md b/agrold-javaweb/charts/agrold-javaweb/README.md index 6f8b981..c7f7fcd 100644 --- a/agrold-javaweb/charts/agrold-javaweb/README.md +++ b/agrold-javaweb/charts/agrold-javaweb/README.md @@ -57,23 +57,22 @@ The command removes all the Kubernetes components associated with the chart and ### Agrold parameters -| Name | Description | Value | -| ------------------------------------ | -------------------------------------------- | ------------------------- | -| `agroldProperties.db_connection_url` | Database connection URL for user management. | `"someurl"` | -| `agroldProperties.db_username` | Database username for user management. | `"user"` | -| `agroldProperties.db_password` | Database password for user management. | `"password"` | -| `agroldProperties.rf_link` | Link to RelFinder **ingress**. | `"https://rf.someurl.fr"` | -| `agroldProperties.description` | Description showed in Tomcat. | `""` | +| Name | Description | Value | +| ------------------------------------- | ----------------------------------- | ---------------------------- | +| `agroldProperties.rf_link` | Link to RelFinder **ingress**. | `"https://rf.someurl.fr"` | +| `agroldProperties.description` | Description showed in Tomcat. | `""` | +| `agroldProperties.faceted_search_url` | Link to faceted search **ingress**. | `"http://someurl.fr/fct"` | +| `agroldProperties.sparql_endpoint` | Link to SPARQL endpoint. | `"http://someurl.fr/sparql"` | > ℹ️ You can also add other parameters as [mentionned in the readme](https://github.com/SouthGreenPlatform/AgroLD_webapp/tree/master/agrold-javaweb#param%C3%A8tres) ### Global parameters -| Name | Description | Value | -| ------------------------- | ----------------------------------------------- | ----- | -| `global.imageRegistry` | Global Docker image registry | `""` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | -| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` | +| Name | Description | Value | +| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| `global.imageRegistry` | Global Docker image registry | `""` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` | +| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` | | `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `disabled` | ### Common parameters diff --git a/agrold-javaweb/charts/agrold-javaweb/values.yaml b/agrold-javaweb/charts/agrold-javaweb/values.yaml index feaa160..4ed4476 100644 --- a/agrold-javaweb/charts/agrold-javaweb/values.yaml +++ b/agrold-javaweb/charts/agrold-javaweb/values.yaml @@ -8,10 +8,9 @@ ## agroldProperties: - db_connection_url: someurl - db_username: user - db_password: password rf_link: https://rf.someurl.fr + faceted_search_url: http://someurl.fr/fct + sparql_endpoint: "http://someurl.fr/sparql" description: "" ## @param global.imageRegistry Global Docker image registry diff --git a/agrold-javaweb/src/main/java/agrold/config/PropertiesBean.java b/agrold-javaweb/src/main/java/agrold/config/PropertiesBean.java index 0213c72..7da77f0 100644 --- a/agrold-javaweb/src/main/java/agrold/config/PropertiesBean.java +++ b/agrold-javaweb/src/main/java/agrold/config/PropertiesBean.java @@ -7,15 +7,9 @@ */ public class PropertiesBean { @Getter private static final String sparqlEndpoint = System.getProperty("agrold.sparql_endpoint", "http://sparql.southgreen.fr"); - @Getter private static final String DBConnectionUrl = System.getProperty("agrold.db_connection_url"); - @Getter private static final String DBUsername = System.getProperty("agrold.db_username"); - @Getter private static final String DBPassword = System.getProperty("agrold.db_password"); @Getter private static final String RFLink = System.getProperty("agrold.rf_link", "http://rf.southgreen.fr/"); @Getter private static final String instance = System.getProperty("agrold.instance"); @Getter private static final String APIVersion = System.getProperty("APIVersion", "undefined"); - - public static boolean hasDB() { - return DBConnectionUrl != null && DBUsername != null && DBPassword != null; - } + } diff --git a/agrold-javaweb/src/main/webapp/config/config.js b/agrold-javaweb/src/main/webapp/config/config.js index ebfbdf3..193e7eb 100755 --- a/agrold-javaweb/src/main/webapp/config/config.js +++ b/agrold-javaweb/src/main/webapp/config/config.js @@ -1,12 +1,16 @@ WEBAPPURL= "/agrold" -SPARQLENDPOINTURL= system_sparqlendpoint ?? "http://sparql.southgreen.fr"; +SPARQLENDPOINTURL= system_sparqlendpoint; // // still in HTML form in : // WEB-INF/Account/General/AJAX/Admin/_USER_FULL_DATA_LOADER.jsp // WEB-INF/Account/General/AJAX/History/QuickSearchList.jsp // /src/main/webapp/quicksearch.jsp -FACETEDURL="http://agrold.southgreen.fr/fct"; //TODO +FACETEDURL = system_faceted_search_url; +FACETEDPAGE = new URL( + `${(new URL(system_faceted_search_url)).pathname.split("/").map(_ => "..").join("/")}/fct/facet.vsp?cmd=text&sid=231`, + system_faceted_search_url +).href; AGROLDAPIJSONURL= WEBAPPURL + "/api/openapi.json"; diff --git a/agrold-javaweb/src/main/webapp/includes.jsp b/agrold-javaweb/src/main/webapp/includes.jsp index eb64e49..eb3d9c5 100755 --- a/agrold-javaweb/src/main/webapp/includes.jsp +++ b/agrold-javaweb/src/main/webapp/includes.jsp @@ -37,6 +37,7 @@ } const system_sparqlendpoint = parseJsp('<%= System.getProperty("agrold.sparql_endpoint", "http://sparql.southgreen.fr") %>') + const system_faceted_search_url = parseJsp('<%= System.getProperty("agrold.faceted_search_url", "http://sparql.southgreen.fr/faceted") %>') diff --git a/agrold-javaweb/src/main/webapp/index.jsp b/agrold-javaweb/src/main/webapp/index.jsp index 7037377..1aa5849 100755 --- a/agrold-javaweb/src/main/webapp/index.jsp +++ b/agrold-javaweb/src/main/webapp/index.jsp @@ -70,14 +70,6 @@
- <% if(session.getAttribute("sessionUtilisateur")== null){%> - - <% }%>
@@ -91,8 +83,7 @@
-
-
-
@@ -263,38 +200,18 @@ Change your consents - -
- - - + + - - - - - -