// TODO: remove soon! (not used anymore! files are stored locally in tmp!! function getSampleOutput(t2_server, uuid, output, wid, wkf_version) { // t2 server REST call to sample output // the following RESt is used for displaying tmp local files to the screen var httpcall = "http://" + document.location.host + "/t2web/run/" + uuid + "/output/" + output + "?server=" + t2_server + "&wid=" + wid + "&wkf_version=" + wkf_version; // ajax request $.get(httpcall, function (result) { window.frames['data-display'].document.documentElement.innerHTML = result; }); } function readTmpOutput(t2_server, uuid, output, wid, wkf_version) { // TODO: currently t2_server, wid and wkf_version are not used // t2web server call to get wkf results from tmp file var httpcall = "http://" + document.location.host + "/t2web/run/" + uuid + "/output/" + output; $.get(httpcall, function (result) { window.frames['data-display'].document.documentElement.innerHTML = result; }); } function checkRunStatus(t2_server, uuid, wid, wkf_version) { // t2 server REST call to uuid's status var httpcall = "http://" + document.location.host + "/runs/" + uuid + "/status?server=" + t2_server; // ajax request to confirm finished execution //$.get(httpcall, function (result) { // if (result == 'Finished') { // TODO: that probably causes the browser status to show that it's still working!! // clearInterval(runStatusIntervalId); // getOutputs(t2_server, uuid); //getOutputs("http://test.mybiobank.org/taverna-server", "f3dca934-a6d7-44e3-acc3-f8c1f30e0973"); // } //}); $.ajax({ type: "GET", url: httpcall, success: function (result) { if (result == 'Finished') { clearInterval(runStatusIntervalId); getOutputs(t2_server, uuid); } } }); } function getOutputs(t2_server, uuid) { // prepare get outputs call (to local ruby, cross-domain ajax call) var httpoutputs = "http://" + document.location.host + "/t2web/run/" + uuid + "/outputs" + "?server=" + t2_server; console.log("in new function!!!!"); // ajax request to get outputs //$.get(httpoutputs, function (reply) { // if (reply == 'Successful download!') { // window.frames['data-navigation'].document.documentElement.innerHTML = results_navigation; // } //}); $.ajax({ type: "GET", url: httpoutputs, success: function(reply) { if (reply == 'Successful download!') { window.frames['data-navigation'].document.documentElement.innerHTML = results_navigation; } }//, //error: function(reply) { // window.frames['data-navigation'].document.documentElement.innerHTML = results_navigation; //} }); }