Mercurial > hg > orthanc
diff OrthancServer/OrthancExplorer/explorer.js @ 4749:1a061bc2d6ca
Clicking on "Send to remote modality" displays the job information to monitor progress
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 08 Jul 2021 14:57:21 +0200 |
parents | 283d246fafdb |
children | 56ed4c11fc2a 72a850947b11 |
line wrap: on
line diff
--- a/OrthancServer/OrthancExplorer/explorer.js Thu Jul 08 14:42:20 2021 +0200 +++ b/OrthancServer/OrthancExplorer/explorer.js Thu Jul 08 14:57:21 2021 +0200 @@ -1260,19 +1260,23 @@ } if (url != '') { + /** + * In Orthanc <= 1.9.5, synchronous job was used, which caused a + * non-intuitive behavior because of AJAX timeouts on large + * studies. We now use an asynchronous call. + * https://groups.google.com/g/orthanc-users/c/r2LoAp72AWI/m/cVaFXopUBAAJ + **/ $.ajax({ url: url, type: 'POST', - dataType: 'text', - data: pageData.uuid, - async: true, // Necessary to block UI - beforeSend: function() { - $.blockUI({ message: $(loading) }); - }, - complete: function(s) { - $.unblockUI(); - }, - success: function(s) { + data: JSON.stringify({ + 'Synchronous' : false, + 'Resources' : [ pageData.uuid ] + }), + dataType: 'json', + async: false, + success: function(job) { + window.location.assign('explorer.html#job?uuid=' + job.ID); }, error: function() { alert('Error during store');