git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/nlphub@165848 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cee6ef152a
commit
4f161ecff4
|
@ -15,6 +15,7 @@ var checkedAnnotation = "";
|
||||||
var algIndexedArray = [];
|
var algIndexedArray = [];
|
||||||
var computedLanguage = "";
|
var computedLanguage = "";
|
||||||
var dataMiner = "";
|
var dataMiner = "";
|
||||||
|
var appRoot = "/nlphub";
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------
|
||||||
// Starting point: get the csv file with algorithm parameters and set the page
|
// Starting point: get the csv file with algorithm parameters and set the page
|
||||||
|
@ -36,7 +37,7 @@ checkInputLink = function() {
|
||||||
async : true,
|
async : true,
|
||||||
success : function(data, stato) {
|
success : function(data, stato) {
|
||||||
freeText = data;
|
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);
|
+ encodeURIComponent(freeText) + "&dataminer=" + encodeURIComponent(dataMiner);
|
||||||
if(gCubeToken.length > 0)
|
if(gCubeToken.length > 0)
|
||||||
uploaderUrl += "&gcube-token=" + gCubeToken;
|
uploaderUrl += "&gcube-token=" + gCubeToken;
|
||||||
|
@ -99,7 +100,7 @@ initApplication = function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
disableExecuteButton();
|
disableExecuteButton();
|
||||||
var uploaderUrl = "/nlphub/nlphub-uploader-servlet?dataminer=" + encodeURIComponent(dataMiner);
|
var uploaderUrl = appRoot + "/nlphub-uploader-servlet?dataminer=" + encodeURIComponent(dataMiner);
|
||||||
if(gCubeToken.length > 0)
|
if(gCubeToken.length > 0)
|
||||||
uploaderUrl += "&gcube-token=" + gCubeToken;
|
uploaderUrl += "&gcube-token=" + gCubeToken;
|
||||||
|
|
||||||
|
@ -243,9 +244,9 @@ setEventListeners = function() {
|
||||||
// must be written in the workspace and the public link
|
// must be written in the workspace and the public link
|
||||||
// is set.
|
// is set.
|
||||||
if ($("#input-textarea").val().length > 0) {
|
if ($("#input-textarea").val().length > 0) {
|
||||||
if(publicLink == null) {
|
//if(publicLink == null) {
|
||||||
freeText = $("#input-textarea").val();
|
freeText = $("#input-textarea").val();
|
||||||
var uploaderUrl = "/nlphub/nlphub-uploader-servlet?freetext="
|
var uploaderUrl = appRoot + "/nlphub-uploader-servlet?freetext="
|
||||||
+ encodeURIComponent(freeText) + "&dataminer=" + encodeURIComponent(dataMiner);
|
+ encodeURIComponent(freeText) + "&dataminer=" + encodeURIComponent(dataMiner);
|
||||||
if(gCubeToken.length > 0)
|
if(gCubeToken.length > 0)
|
||||||
uploaderUrl += "&gcube-token=" + gCubeToken;
|
uploaderUrl += "&gcube-token=" + gCubeToken;
|
||||||
|
@ -271,8 +272,8 @@ setEventListeners = function() {
|
||||||
$("#file-info").empty();
|
$("#file-info").empty();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
//}
|
||||||
else runAlgorithm();
|
//else runAlgorithm();
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
@ -579,7 +580,7 @@ runAlgorithm = function() {
|
||||||
parameters += "&plink=" + encodeURIComponent(publicLink);
|
parameters += "&plink=" + encodeURIComponent(publicLink);
|
||||||
parameters += "&algs=" + algList;
|
parameters += "&algs=" + algList;
|
||||||
|
|
||||||
var nlphubUrl = "/nlphub/nlphub-servlet?" + parameters;
|
var nlphubUrl = appRoot + "/nlphub-servlet?" + parameters;
|
||||||
if(gCubeToken.length > 0)
|
if(gCubeToken.length > 0)
|
||||||
nlphubUrl += "&gcube-token=" + gCubeToken;
|
nlphubUrl += "&gcube-token=" + gCubeToken;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -629,7 +630,7 @@ getOutputJson = function(message) {
|
||||||
parameters += "&tobemap=" + encodeURI(tobemap);
|
parameters += "&tobemap=" + encodeURI(tobemap);
|
||||||
//console.log(parameters);
|
//console.log(parameters);
|
||||||
|
|
||||||
var mapperUrl = "/nlphub/nlphub-mapper-servlet?" + parameters;
|
var mapperUrl = appRoot + "/nlphub-mapper-servlet?" + parameters;
|
||||||
if(gCubeToken.length > 0)
|
if(gCubeToken.length > 0)
|
||||||
mapperUrl += "&gcube-token=" + gCubeToken;
|
mapperUrl += "&gcube-token=" + gCubeToken;
|
||||||
|
|
||||||
|
@ -1001,7 +1002,7 @@ resizeTable = function() {
|
||||||
+ "\" value=\"" + annotations[i]
|
+ "\" value=\"" + annotations[i]
|
||||||
+ "\" checked=\"checked\"></input> <label for=\"check-" + i
|
+ "\" checked=\"checked\"></input> <label for=\"check-" + i
|
||||||
+ "\">" + annotations[i] + "</label>";
|
+ "\">" + annotations[i] + "</label>";
|
||||||
if(annotations[i].toLowerCase() == "keyword") {
|
if((annotations[i].toLowerCase() == "keyword") || (annotations[i].toLowerCase() == "event")) {
|
||||||
annotationElement = "<input type=\"checkbox\" id=\"check-" + i
|
annotationElement = "<input type=\"checkbox\" id=\"check-" + i
|
||||||
+ "\" value=\"" + annotations[i]
|
+ "\" value=\"" + annotations[i]
|
||||||
+ "\"></input> <label for=\"check-" + i
|
+ "\"></input> <label for=\"check-" + i
|
||||||
|
@ -1081,7 +1082,6 @@ buildLanguageList = function() {
|
||||||
selectAnnotationsByLanguage();
|
selectAnnotationsByLanguage();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#language-select").change();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue