diff --git a/config/plugins/visualizations/ipython/static/ipython.js b/config/plugins/visualizations/ipython/static/ipython.js index 32652129390..1712280e795 100644 --- a/config/plugins/visualizations/ipython/static/ipython.js +++ b/config/plugins/visualizations/ipython/static/ipython.js @@ -65,16 +65,23 @@ function test_ie_availability(url){ */ function load_notebook(password_auth, password, notebook_login_url, notebook_access_url, apache_urls, galaxy_root){ $( document ).ready(function() { + var counter = 0; $('#main').append(''); interval = setInterval(function(){ $.ajax({ type: "GET", url: notebook_access_url, success: function(){ + counter++; clearInterval(interval); _handle_notebook_loading(password_auth, password, notebook_login_url, notebook_access_url, apache_urls); }, - error: function(){ + error: function(a, b, c){ + counter++; + if(counter > 10){ + clearInterval(interval); + console.log("Giving up!"); + } console.log("Some error"); } });