mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Give up after 10 tries
This commit is contained in:
@@ -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('<img id="spinner" src="' + galaxy_root + '/static/style/largespinner.gif" style="position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;">');
|
||||
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");
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user