X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=testing%2FMCTXWeb%2Fpublic_html%2Fstatic%2Fmctx.gui.js;h=606c0be942230a8b2bb9473032e681f1bd4fdc43;hb=989a1d2ff5f5afc20f78738f57cc829ae9d11e99;hp=a9e8ae7b2b1f7339376a58a6822c382b20f4dfa3;hpb=da26b105275a40e6947b58d1786bc73378c7c233;p=matches%2FMCTX3420.git diff --git a/testing/MCTXWeb/public_html/static/mctx.gui.js b/testing/MCTXWeb/public_html/static/mctx.gui.js index a9e8ae7..606c0be 100644 --- a/testing/MCTXWeb/public_html/static/mctx.gui.js +++ b/testing/MCTXWeb/public_html/static/mctx.gui.js @@ -22,7 +22,8 @@ mctx.sensors = { 2 : {name : "Strain gauge 3"}, 3 : {name : "Strain gauge 4"}, 4 : {name : "Pressure sensor 1"}, - 5 : {name : "Pressure sensor 2"} + 5 : {name : "Pressure sensor 2"}, + 6 : {name : "Pressure sensor 3"} }; mctx.actuators = { @@ -187,6 +188,9 @@ $.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."); @@ -194,4 +198,8 @@ $.fn.setErrorLog = function () { }; updater(); -}; \ No newline at end of file +}; + +$(document).ajaxError(function (event, jqXHR) { + //console.log("AJAX query failed with: " + jqXHR.status + " (" + jqXHR.statusText + ")"); +}); \ No newline at end of file