Commit 6bbc05f0 authored by Penom Nom's avatar Penom Nom
Browse files

No commit message

No commit message
parent d0e476b9
......@@ -182,24 +182,42 @@ $(function () {
})
$("#refresh_workflow").click(function(){
// try to get wf status
$.ajax({
url : $("#server_url").val() + '/get_workflow_status?display=list&workflow_id=' + running_wf.id ,
dataType : 'jsonp',
timeout: 5000 , // More than enough to submit the request
success : function(statusdata){
if (statusdata.status == "completed"){
// get outputs
$.ajax({
url : $("#server_url").val() + '/get_workflow_outputs?workflow_id=' + running_wf.id,
dataType : 'jsonp',
success : function(data){
$elementBody.html("<div class='tx-nG6-wait'>Please wait while retrieving your archive</div>");
$.each(data, function(i, component) {
$.each(component, function(i, file) {
if (file.extension == '.gz'){
$("#myModal").modal('hide');
location.href = file.url;
return;
}
});
});
},
});
}
else {
$('#wfstatus').wfstatus('reload');
}
},
error : function(jqXHR, textStatus, errorThrown){
$('#wfstatus').wfstatus('reload');
}
});
$('#wfstatus').wfstatus('reload');
// try to get outputs
$.ajax({
url : $("#server_url").val() + '/get_workflow_outputs?workflow_id=' + running_wf.id,
dataType : 'jsonp',
success : function(data){
$elementBody.html("<div class='tx-nG6-wait'>Please wait while retrieving your archive</div>");
$.each(data, function(i, component) {
$.each(component, function(i, file) {
if (file.extension == '.gz'){
$("#myModal").modal('hide');
location.href = file.url;
return;
}
});
});
},
});
});
}
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment