This commit is contained in:
Erik Perrone 2018-04-11 09:43:11 +00:00
parent cee6ef152a
commit 4f161ecff4
1 changed files with 34 additions and 34 deletions

View File

@ -15,6 +15,7 @@ var checkedAnnotation = "";
var algIndexedArray = [];
var computedLanguage = "";
var dataMiner = "";
var appRoot = "/nlphub";
// ------------------------------------------------------------------------------------------------------
// Starting point: get the csv file with algorithm parameters and set the page
@ -36,7 +37,7 @@ checkInputLink = function() {
async : true,
success : function(data, stato) {
freeText = data;
var uploaderUrl = "/nlphub/nlphub-uploader-servlet?getlang=on&freetext="
var uploaderUrl = appRoot + "/nlphub-uploader-servlet?getlang=on&freetext="
+ encodeURIComponent(freeText) + "&dataminer=" + encodeURIComponent(dataMiner);
if(gCubeToken.length > 0)
uploaderUrl += "&gcube-token=" + gCubeToken;
@ -99,7 +100,7 @@ initApplication = function() {
});
disableExecuteButton();
var uploaderUrl = "/nlphub/nlphub-uploader-servlet?dataminer=" + encodeURIComponent(dataMiner);
var uploaderUrl = appRoot + "/nlphub-uploader-servlet?dataminer=" + encodeURIComponent(dataMiner);
if(gCubeToken.length > 0)
uploaderUrl += "&gcube-token=" + gCubeToken;
@ -243,9 +244,9 @@ setEventListeners = function() {
// must be written in the workspace and the public link
// is set.
if ($("#input-textarea").val().length > 0) {
if(publicLink == null) {
//if(publicLink == null) {
freeText = $("#input-textarea").val();
var uploaderUrl = "/nlphub/nlphub-uploader-servlet?freetext="
var uploaderUrl = appRoot + "/nlphub-uploader-servlet?freetext="
+ encodeURIComponent(freeText) + "&dataminer=" + encodeURIComponent(dataMiner);
if(gCubeToken.length > 0)
uploaderUrl += "&gcube-token=" + gCubeToken;
@ -271,8 +272,8 @@ setEventListeners = function() {
$("#file-info").empty();
}
});
}
else runAlgorithm();
//}
//else runAlgorithm();
}
else {
@ -579,7 +580,7 @@ runAlgorithm = function() {
parameters += "&plink=" + encodeURIComponent(publicLink);
parameters += "&algs=" + algList;
var nlphubUrl = "/nlphub/nlphub-servlet?" + parameters;
var nlphubUrl = appRoot + "/nlphub-servlet?" + parameters;
if(gCubeToken.length > 0)
nlphubUrl += "&gcube-token=" + gCubeToken;
$.ajax({
@ -629,7 +630,7 @@ getOutputJson = function(message) {
parameters += "&tobemap=" + encodeURI(tobemap);
//console.log(parameters);
var mapperUrl = "/nlphub/nlphub-mapper-servlet?" + parameters;
var mapperUrl = appRoot + "/nlphub-mapper-servlet?" + parameters;
if(gCubeToken.length > 0)
mapperUrl += "&gcube-token=" + gCubeToken;
@ -1001,7 +1002,7 @@ resizeTable = function() {
+ "\" value=\"" + annotations[i]
+ "\" checked=\"checked\"></input> <label for=\"check-" + i
+ "\">" + annotations[i] + "</label>";
if(annotations[i].toLowerCase() == "keyword") {
if((annotations[i].toLowerCase() == "keyword") || (annotations[i].toLowerCase() == "event")) {
annotationElement = "<input type=\"checkbox\" id=\"check-" + i
+ "\" value=\"" + annotations[i]
+ "\"></input> <label for=\"check-" + i
@ -1081,7 +1082,6 @@ buildLanguageList = function() {
selectAnnotationsByLanguage();
});
$("#language-select").change();
}
/*