Merge branch 'master' of https://github.com/szmoore/MCTX3420
[matches/MCTX3420.git] / testing / MCTXWeb / public_html / static / mctx.gui.js
index 82f823c..247484d 100644 (file)
@@ -188,9 +188,15 @@ $.fn.setErrorLog = function () {
   var updater = function () {
     $.ajax({url : url}).done(function (data) {
       outdiv.text(data);
+      outdiv.scrollTop(
+        outdiv[0].scrollHeight - outdiv.height()
+      );
       setTimeout(updater, 1000);
     }).fail(function (jqXHR) {
-      outdiv.text("Failed to retrieve the error log.");
+      if (jqXHR.status === 502 || jqXHR.status === 0) {
+        outdiv.text("Failed to retrieve the error log.");
+      }
+      setTimeout(updater, 1500);
     });
   };
   

UCC git Repository :: git.ucc.asn.au