From: Tara L Andrews Date: Mon, 3 Sep 2012 06:30:31 +0000 (+0200) Subject: let stexaminer run without IDP server reachable X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec0d9b5bd22366641c57a5c289d5ae7192fd60d2;p=scpubgit%2Fstemmaweb.git let stexaminer run without IDP server reachable --- diff --git a/root/js/stexaminer.js b/root/js/stexaminer.js index d64a3b6..fd7eade 100644 --- a/root/js/stexaminer.js +++ b/root/js/stexaminer.js @@ -63,8 +63,14 @@ function show_stats( rs ) { var rshtml = $('#stats_template').clone(); rshtml.find('#statrank').append( rs.id ); if( "unsolved" in rs ) { - rshtml.find('.solutionstatus').append( - "(Not yet calculated for this location - please try later)"); + var nocalcmsg; + if( rs.unsolved == 'IDP error' ) { + nocalcmsg = $('').attr('class', 'error').append( + "(Could not reach calculation server - are you offline?)" ); + } else { + nocalcmsg = "(Not yet calculated for this location - please try later)"; + } + rshtml.find('.solutionstatus').append( nocalcmsg ); } else { $.each( rs.readings, function( idx, rdghash ) { var rdgstats = $('#reading_template').clone();