forked from misdoro/VAMDC-Portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from nicolasmoreau/dev
Improve query store result display
- Loading branch information
Showing
6 changed files
with
105 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
03/04/2017: | ||
Problème avec le clic sur les liens vers les fichiers xsams pour declencher l'association des requêtes dans le querystore. | ||
Le javascript rafraichissant la page ne fonctionnait pas sous firefox. Les liens ont été remplacés par des boutons. | ||
|
||
|
||
13/02/2017: | ||
SEAM retourne des erreurs d'exécution lorsqu'il est lancé avec java8 : | ||
Could not instantiate Seam component: registration | ||
|
||
Le fichier ~/.mavenrc a été édité pour que JAVA_HOME pointe sur java7 | ||
JAVA_HOME est défini dans deploy.sh pour que jboss utilise java7 | ||
|
||
Utilise JSF en version 1.x | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
portal.ejb/src/main/java/org/vamdc/portal/session/queryLog/QueryStoreResponseReader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.vamdc.portal.session.queryLog; | ||
|
||
import org.json.JSONException; | ||
import org.json.JSONObject; | ||
|
||
public class QueryStoreResponseReader { | ||
|
||
public final static String SUCCESSFULL_REQUEST = "UUIDCorrectlyAssociated"; | ||
public final static String HEAD_ASSOCIATION_FAILED = "UUIDInErrorOnHeadQuery"; | ||
public final static String GET_ASSOCIATION_FAILED = "UUIDInErrorOnGetQuery"; | ||
|
||
public final static QueryStoreResponse parseResponse(String json) throws JSONException{ | ||
JSONObject jsonObject = new JSONObject(json); | ||
|
||
if(jsonObject.keySet().contains(SUCCESSFULL_REQUEST)) | ||
return new QueryStoreResponse(QueryStoreResponse.STATUS_SUCCESS, jsonObject.getString(SUCCESSFULL_REQUEST), ""); | ||
else if(jsonObject.keySet().contains(HEAD_ASSOCIATION_FAILED)) | ||
return new QueryStoreResponse(QueryStoreResponse.STATUS_ERROR, jsonObject.getString(SUCCESSFULL_REQUEST), "Head association failed"); | ||
else if(jsonObject.keySet().contains(GET_ASSOCIATION_FAILED)) | ||
return new QueryStoreResponse(QueryStoreResponse.STATUS_ERROR, jsonObject.getString(SUCCESSFULL_REQUEST), "Get association failed"); | ||
|
||
else | ||
throw new JSONException("Unknown field in JSON object"); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters