diff OrthancExplorer/query-retrieve.js @ 1501:aaf368280f5a

C-Echo testing can be triggered from Orthanc Explorer (in the query/retrieve page)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 Aug 2015 17:23:28 +0200
parents 21a2929e541d
children e0517f25919e
line wrap: on
line diff
--- a/OrthancExplorer/query-retrieve.js	Fri Aug 07 16:50:38 2015 +0200
+++ b/OrthancExplorer/query-retrieve.js	Fri Aug 07 17:23:28 2015 +0200
@@ -45,6 +45,35 @@
 });
 
 
+$('#qr-echo').live('click', function() {
+  var server = $('#qr-server').val();
+  var message = 'Error: The C-Echo has failed!';
+
+  $.ajax({
+    url: '../modalities/' + server + '/echo',
+    type: 'POST', 
+    cache: false,
+    async: false,
+    success: function() {
+      message = 'The C-Echo has succeeded!';
+    }
+  });
+
+  $('<div>').simpledialog2({
+    mode: 'button',
+    headerText: 'Echo result',
+    headerClose: true,
+    buttonPrompt: message,
+    animate: false,
+    buttons : {
+      'OK': { click: function () { } }
+    }
+  });
+
+  return false;
+});
+
+
 $('#qr-submit').live('click', function() {
   var query = {
     'Level' : 'Study',