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

Issue 554 clean #598

Merged
merged 36 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
583a285
Update documentation tomcat6 to tomcat9
pierrejego Sep 14, 2021
8dff1af
Update all libs to last stable compatible version
pierrejego Sep 14, 2021
d632def
update MDC key information in log4j, this should be change also in da…
pierrejego Sep 14, 2021
2768dfb
remove link to javadoc and wadl, this is replace by swagger
pierrejego Sep 14, 2021
929c1bc
Add swagger-ui information, there is still a issue on swagger context
pierrejego Sep 14, 2021
340e2f6
Remove webconfiguration (servlet 3) won't start with tomcat8 or 9
pierrejego Sep 15, 2021
4ab7b99
user WFSDataStoreFactory key instead of cadastrapp Constant
pierrejego Sep 15, 2021
c21363a
change context management for swagger api
pierrejego Sep 15, 2021
1b5c536
add interceptor to mvc configuration
pierrejego Sep 17, 2021
d268764
Update configuration to have swagger-ui swagger-api index.jsp working…
pierrejego Sep 17, 2021
d1c387a
Make all controller extends CadController, to be able to add for exam…
pierrejego Sep 17, 2021
ab45091
Update to laste geotools version
pierrejego Sep 17, 2021
b9c450f
Change response from file to byte[] to have one less IO acces
pierrejego Sep 17, 2021
1f4df83
remove headers on section controller
pierrejego Sep 17, 2021
86f1536
Replace ReponseEntity<File> by ResponseEntity<byte[]> and add missing…
pierrejego Sep 17, 2021
2b9fc51
Update default value for int field and add comments to understand tho…
pierrejego Sep 17, 2021
fe06a19
remove unused librairies
pierrejego Sep 17, 2021
49e1732
replace deprecated httpClient by new version
pierrejego Sep 17, 2021
60dccd1
Correction after integration test with mapfishapp addons
pierrejego Sep 17, 2021
845de25
update version with last stable release
pierrejego Sep 17, 2021
6118cfd
Use DataStoreFinder for WFS calls instead of createDatastore
pierrejego Sep 18, 2021
2a779b7
Correction on debug parameters
pierrejego Sep 19, 2021
cd8a025
url pattern correction for tomcat8 purpose
pierrejego Sep 19, 2021
8b4849c
Prevent table and sequence name change
jusabatier Nov 16, 2021
a912474
Remove unused import
jusabatier Nov 17, 2021
7aa93cf
Ajout de l'extension '.pdf' aux document générés lors de demandes
jusabatier Nov 17, 2021
ee3b04b
Correction de l'erreur de generation de l'image de BP dans les demandes
jusabatier Nov 17, 2021
b154467
Reduction des logs par defaut
jusabatier Nov 17, 2021
8e1f599
Merge pull request #597 from jusabatier/issue-554-clean
pierrejego Nov 18, 2021
9223d38
Update postgresql and logback version
pierrejego Nov 19, 2021
25be1da
Update ant plugin version to 3.0.0 Fixes georchestra/cadastrapp#574
pierrejego Nov 19, 2021
744ee50
Log Send reponse before removing MDC information
pierrejego Nov 19, 2021
df7d095
replace ExtJs fileUpload by Js Filereader to send to service
pierrejego Nov 19, 2021
f630739
clear MDC context on failure
pierrejego Nov 19, 2021
94e72d5
add missing space in log file configuration
pierrejego Nov 19, 2021
f23926d
Change hibernate ddl to validate
pierrejego Nov 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 52 additions & 12 deletions addons/cadastrapp/js/searchParcelleByRef.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,21 +542,61 @@ GEOR.Addons.Cadastre.initRechercheParcelle = function() {
} else if (currentForm.id == 'parcForthForm') {
// Recherche parcelle par fichier
if (currentForm.getForm().findField('filePath').value != undefined && currentForm.getForm().findField('filePath').value.length > 2) {


// Message de chargement
var box = Ext.MessageBox.wait("Lecture du document...",OpenLayers.i18n('Chargement'));

// Titre de l'onglet resultat
var resultTitle = OpenLayers.i18n('cadastrapp.result.title.fichier');

// LECTURE CSV
var files = document.getElementById("parcForthForm").querySelectorAll("input[type=file]")[0].files;

function readFile (blob, callback){
var reader = new FileReader();
reader.onload = callback;
reader.readAsText(blob);
}

// sousmet le form (pour envoyer le fichier)
currentForm.getForm().submit({
url : GEOR.Addons.Cadastre.cadastrappWebappUrl + 'fromParcellesFile',
params : {},
success : function(form, action) {
GEOR.Addons.Cadastre.addNewResultParcelle(resultTitle, GEOR.Addons.Cadastre.getResultParcelleStore(action.response.responseText, true));
},
failure : function(form, action) {
alert('ERROR');
}
// read content
readFile(files[0], function(e){

if (typeof(e.target.result) == "string"){

var content = JSON.stringify(e.target.result);
content = JSON.parse(content);
// Separateurs: virgule, point virgule, pipe, espace et retour à la ligne
content = content.split(/\r\n|\n|,|;|\|/);

// Filtre pour ne garder que ce qui ressemble a un identifiant de parcelle
// et ne garder qu'une occurence de chaque identifiant
var parcellesFromFile = content.filter(function (value, index, self) {
return (self.indexOf(value) === index && value.length >= 8 && value.match("^[0-9]{5,}.*"));
});

// Envoie la liste de compte communal extraite du fichier
Ext.Ajax.request({
method : 'POST',
url : GEOR.Addons.Cadastre.url.serviceParcelle,
params : { parcelle : parcellesFromFile},
success : function(result) {
box.hide();
GEOR.Addons.Cadastre.addNewResultParcelle(resultTitle, GEOR.Addons.Cadastre.getResultParcelleStore(result.responseText, false));
},
failure : function(form, action) {
box.hide();
alert('ERROR');
}
});
}else{
box.hide();
alert('Mauvais type de fichier');
}
});
} else {

}

else {
//TITRE de l'onglet resultat
var resultTitle = "Recherche par lot";

Expand Down
16 changes: 8 additions & 8 deletions cadastrapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ This application is made to be installed behind GeOrchestra security proxy. To i
-- As for gerochestra tomcat instance, you will have to create a new instance
(choose a port not already use here we choose 8480 for http endpoint and 8405 to stop
```
sudo tomcat6-instance-create -p 8480 -c 8405 /var/lib/tomcat-cadastrapp
sudo tomcat9-instance-create -p 8480 -c 8405 /var/lib/tomcat-cadastrapp
```
### Init policy and service
sudo mkdir /var/lib/tomcat-cadastrapp/conf/policy.d
sudo touch /var/lib/tomcat-cadastrapp/conf/policy.d/empty.policy
sudo chown -R tomcat6:tomcat6 /var/lib/tomcat-cadastrapp
sudo cp /etc/init.d/tomcat6 /etc/init.d/tomcat-cadastrapp
sudo cp /etc/default/tomcat6 /etc/default/tomcat-cadastrapp
sudo chown -R tomcat:tomcat /var/lib/tomcat-cadastrapp
sudo cp /etc/init.d/tomcat9 /etc/init.d/tomcat-cadastrapp
sudo cp /etc/default/tomcat9 /etc/default/tomcat-cadastrapp

Finally, edit the ```/etc/init.d/tomcat-cadastrapp``` script, find the following line:
```
# Provides: tomcat6
# Provides: tomcat9
```
... and replace it with:
```
Expand All @@ -44,12 +44,12 @@ JAVA_OPTS="-Djava.awt.headless=true -XX:+UseConcMarkSweepGC"
And later add these lines (change the ```STOREPASSWORD``` string):
```
JAVA_OPTS="$JAVA_OPTS \
-Xms1024m \
-Xms256m \
-Xmx1024m \
-XX:MaxPermSize=256m"

JAVA_OPTS="$JAVA_OPTS \
-Djavax.net.ssl.trustStore=/etc/tomcat6/keystore \
-Djavax.net.ssl.trustStore=/etc/georchestra/keystore \
-Djavax.net.ssl.trustStorePassword=STOREPASSWORD"
```
### Configure connectors
Expand Down Expand Up @@ -86,7 +86,7 @@ In ```/var/lib/tomcat-cadastrapp/conf/context.xml```, add a new ResourceLink at
#### Add jar require for this datasource

To be able to connect to postgresql database, tomcat will have to get postgresql client librairie in his classloader.
In tomcat6 instance, you will have to add ```postgresql-9.1-901-1.jdbc4.jar``` to ```/var/lib/tomcat-cadastrapp/lib``` folder (with a symlink)
In tomcat9 instance, you will have to add ```postgresql-42.2.22.jar``` to ```/var/lib/tomcat-cadastrapp/lib``` folder (with a symlink)

### Start the instance

Expand Down
Loading