Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
4748:4336642b8cff | 4749:1a061bc2d6ca |
---|---|
1258 url = '../peers/' + peer + '/store'; | 1258 url = '../peers/' + peer + '/store'; |
1259 loading = '#peer-store'; | 1259 loading = '#peer-store'; |
1260 } | 1260 } |
1261 | 1261 |
1262 if (url != '') { | 1262 if (url != '') { |
1263 /** | |
1264 * In Orthanc <= 1.9.5, synchronous job was used, which caused a | |
1265 * non-intuitive behavior because of AJAX timeouts on large | |
1266 * studies. We now use an asynchronous call. | |
1267 * https://groups.google.com/g/orthanc-users/c/r2LoAp72AWI/m/cVaFXopUBAAJ | |
1268 **/ | |
1263 $.ajax({ | 1269 $.ajax({ |
1264 url: url, | 1270 url: url, |
1265 type: 'POST', | 1271 type: 'POST', |
1266 dataType: 'text', | 1272 data: JSON.stringify({ |
1267 data: pageData.uuid, | 1273 'Synchronous' : false, |
1268 async: true, // Necessary to block UI | 1274 'Resources' : [ pageData.uuid ] |
1269 beforeSend: function() { | 1275 }), |
1270 $.blockUI({ message: $(loading) }); | 1276 dataType: 'json', |
1271 }, | 1277 async: false, |
1272 complete: function(s) { | 1278 success: function(job) { |
1273 $.unblockUI(); | 1279 window.location.assign('explorer.html#job?uuid=' + job.ID); |
1274 }, | |
1275 success: function(s) { | |
1276 }, | 1280 }, |
1277 error: function() { | 1281 error: function() { |
1278 alert('Error during store'); | 1282 alert('Error during store'); |
1279 } | 1283 } |
1280 }); | 1284 }); |