From a77992de438d9c29ff8695087c3ef057d9470d81 Mon Sep 17 00:00:00 2001 From: nicolas Date: Tue, 4 Aug 2015 16:15:38 +0200 Subject: [PATCH 1/9] validation buttons above disclaimer text --- .../main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml b/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml index 71411e5..461d4fb 100644 --- a/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml +++ b/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml @@ -10,7 +10,7 @@

You must accept the following disclaimer to use our services :

- + @@ -20,4 +20,6 @@ + + From 5920e591f4d23960157ca6013f17673a7eb1ab40 Mon Sep 17 00:00:00 2001 From: nicolas Date: Thu, 6 Aug 2015 16:08:21 +0200 Subject: [PATCH 2/9] bugs correction : password / verification password mismatch was not checked. Email address syntax is now checked --- .../vamdc/portal/session/security/Register.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/security/Register.java b/portal.ejb/src/main/java/org/vamdc/portal/session/security/Register.java index c799986..6768067 100644 --- a/portal.ejb/src/main/java/org/vamdc/portal/session/security/Register.java +++ b/portal.ejb/src/main/java/org/vamdc/portal/session/security/Register.java @@ -1,5 +1,8 @@ package org.vamdc.portal.session.security; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.In; @@ -38,7 +41,11 @@ public void register() new RunAsOperation() { @Override public void execute() { - if (!identityManager.userExists(username)){ + if(password.equals(verifyPassword) == false){ + throw new IdentityManagementException("Password and verification password do not match."); + }else if(isValidEmail() == false){ + throw new IdentityManagementException("Email address is not valid."); + } else if (!identityManager.userExists(username)){ identityManager.createUser(username,password); }else{ throw new IdentityManagementException("User #{register.username} already exists!"); @@ -53,6 +60,12 @@ public void execute() { } } + + private Boolean isValidEmail(){ + Pattern pattern = Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); + Matcher matcher = pattern.matcher(email); + return matcher.find(); + } @Observer(JpaIdentityStore.EVENT_PRE_PERSIST_USER) From df4cc02b7bd02d5b3ba9dee3f32842c36bca7d67 Mon Sep 17 00:00:00 2001 From: nicolas Date: Mon, 10 Aug 2015 10:24:49 +0200 Subject: [PATCH 3/9] CNIL conformity : warn user that a cookie will be installed, 1 year expiration date --- .../main/java/org/vamdc/portal/cookie/DisclaimerCookie.java | 4 ++-- .../main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/portal.ejb/src/main/java/org/vamdc/portal/cookie/DisclaimerCookie.java b/portal.ejb/src/main/java/org/vamdc/portal/cookie/DisclaimerCookie.java index 3379fe3..a048993 100644 --- a/portal.ejb/src/main/java/org/vamdc/portal/cookie/DisclaimerCookie.java +++ b/portal.ejb/src/main/java/org/vamdc/portal/cookie/DisclaimerCookie.java @@ -23,7 +23,7 @@ public Boolean getValue(){ } public void setValue(Boolean value){ - // 5 years expire date - cookieHelper.setCookie(this.name, value.toString(), 5 * 365 * 24 * 60 * 60 ); + // 1 year expire date + cookieHelper.setCookie(this.name, value.toString(), 365 * 24 * 60 * 60 ); } } diff --git a/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml b/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml index 461d4fb..35f583e 100644 --- a/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml +++ b/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml @@ -8,7 +8,7 @@ xmlns:rich="http://richfaces.org/rich">

- You must accept the following disclaimer to use our services : + You must accept the following disclaimer to use our services ( this will install a cookie on your web browser ) :

From d604a6f623c90c81b637eef6c45b65402743adc1 Mon Sep 17 00:00:00 2001 From: nicolas Date: Mon, 10 Aug 2015 10:35:18 +0200 Subject: [PATCH 4/9] text correction --- .../src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml b/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml index 35f583e..eee60f7 100644 --- a/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml +++ b/portal.war/src/main/webapp/xhtml/disclaimer/disclaimerValidation.xhtml @@ -8,7 +8,7 @@ xmlns:rich="http://richfaces.org/rich">

- You must accept the following disclaimer to use our services ( this will install a cookie on your web browser ) : + You must accept the following disclaimer to use our services ( this will install a cookie in your web browser ) :

From 35304b8d05453921303ce5e006489324805448bc Mon Sep 17 00:00:00 2001 From: nicolas Date: Mon, 10 Aug 2015 17:34:20 +0200 Subject: [PATCH 5/9] add PDL requests to dev version for demo purpose --- portal.war/src/main/webapp/xhtml/query/formMenu.xhtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/portal.war/src/main/webapp/xhtml/query/formMenu.xhtml b/portal.war/src/main/webapp/xhtml/query/formMenu.xhtml index e091b3e..013a2a3 100644 --- a/portal.war/src/main/webapp/xhtml/query/formMenu.xhtml +++ b/portal.war/src/main/webapp/xhtml/query/formMenu.xhtml @@ -49,8 +49,8 @@ action="#{query.addFormBranches}" /> - + From bfee27045bb26df9c78bb6e9c6e734063d5ed539 Mon Sep 17 00:00:00 2001 From: nicolas Date: Wed, 12 Aug 2015 15:10:39 +0200 Subject: [PATCH 6/9] bug correction : when there is only one node responding, manually call function filling selected nodes list on result page --- .../org/vamdc/portal/session/preview/PreviewManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewManager.java b/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewManager.java index 61dc6be..2ac24b6 100644 --- a/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewManager.java +++ b/portal.ejb/src/main/java/org/vamdc/portal/session/preview/PreviewManager.java @@ -175,14 +175,18 @@ public void completeEvent(){ this.completeEventCalled=true; List results = getNodes(); int numActive=0; + String nodeId = null; + for (HttpHeadResponse node:results){ - - if (node.isOk() && node.getStatus()==Response.OK) + if (node.isOk() && node.getStatus()==Response.OK){ + nodeId = node.getIvoaID(); numActive++; + } } if (numActive==1){ + consumers.updateNodeIds(nodeId); consumers.getQueries().put(results.get(0).getFullQueryURL(), true); } From 84d7dc20e56a56c577ffa9d6ec6df2a713dfae5d Mon Sep 17 00:00:00 2001 From: nicolas Date: Wed, 12 Aug 2015 16:45:14 +0200 Subject: [PATCH 7/9] change error message position to improve readability --- portal.war/src/main/webapp/layout/header.xhtml | 6 ------ portal.war/src/main/webapp/layout/template.xhtml | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/portal.war/src/main/webapp/layout/header.xhtml b/portal.war/src/main/webapp/layout/header.xhtml index bc73cf9..83cffa0 100755 --- a/portal.war/src/main/webapp/layout/header.xhtml +++ b/portal.war/src/main/webapp/layout/header.xhtml @@ -3,17 +3,11 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" - xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" styleClass="my-toolbar-header"> - - - \ No newline at end of file diff --git a/portal.war/src/main/webapp/layout/template.xhtml b/portal.war/src/main/webapp/layout/template.xhtml index 1fb8502..5160c8c 100644 --- a/portal.war/src/main/webapp/layout/template.xhtml +++ b/portal.war/src/main/webapp/layout/template.xhtml @@ -23,7 +23,11 @@ window.history.forward();
- + + +
From 6317b374cc9bf1f795062fccacae912ab55a68e4 Mon Sep 17 00:00:00 2001 From: nicolas Date: Wed, 9 Sep 2015 16:29:46 +0200 Subject: [PATCH 8/9] remove Asynchronous request from menu in advanced query; reduces nodes table width in nodes listing page --- portal.war/src/main/webapp/nodes.xhtml | 2 +- portal.war/src/main/webapp/stylesheet/style.css | 4 ++++ portal.war/src/main/webapp/xhtml/query/formMenu.xhtml | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/portal.war/src/main/webapp/nodes.xhtml b/portal.war/src/main/webapp/nodes.xhtml index 07219da..8a64fce 100644 --- a/portal.war/src/main/webapp/nodes.xhtml +++ b/portal.war/src/main/webapp/nodes.xhtml @@ -10,7 +10,7 @@ - + diff --git a/portal.war/src/main/webapp/stylesheet/style.css b/portal.war/src/main/webapp/stylesheet/style.css index ca61ee2..f1f0312 100644 --- a/portal.war/src/main/webapp/stylesheet/style.css +++ b/portal.war/src/main/webapp/stylesheet/style.css @@ -185,3 +185,7 @@ -moz-border-radius: 10px; border-radius: 10px; } + +.nodesTable{ + width : 90%; +} diff --git a/portal.war/src/main/webapp/xhtml/query/formMenu.xhtml b/portal.war/src/main/webapp/xhtml/query/formMenu.xhtml index 013a2a3..85a4585 100644 --- a/portal.war/src/main/webapp/xhtml/query/formMenu.xhtml +++ b/portal.war/src/main/webapp/xhtml/query/formMenu.xhtml @@ -49,8 +49,8 @@ action="#{query.addFormBranches}" /> - + From c07b89fa9c2576d95cdce7d06cf31fde8c497403 Mon Sep 17 00:00:00 2001 From: nicolas Date: Fri, 11 Sep 2015 10:18:05 +0200 Subject: [PATCH 9/9] form title was incorrect --- .../queryBuilder/formsTree/WithReactionCollisionForm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/formsTree/WithReactionCollisionForm.java b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/formsTree/WithReactionCollisionForm.java index c6fab7b..9f10369 100644 --- a/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/formsTree/WithReactionCollisionForm.java +++ b/portal.ejb/src/main/java/org/vamdc/portal/session/queryBuilder/formsTree/WithReactionCollisionForm.java @@ -124,7 +124,7 @@ public void setMaxElementCount(Integer maxElementCount) { @Override public String getTitle() { - return "Please, enter the number of targets and colliders you wish to add"; + return "Please, enter the number of reactants and products you wish to add"; } @Override