mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-21 12:10:34 +09:00
fix: Stop polling enhanced apps when api returns error
This commit is contained in:
committed by
Attila Jozsef Kerekes
parent
f9280cd4c0
commit
48616e87bd
@@ -69,8 +69,13 @@ $.when( $.ready ).then(function() {
|
||||
if(timer < max_timer) timer += 2000;
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
// Schedule the next request when the current one's complete
|
||||
complete: function(jqXHR) {
|
||||
if (jqXHR.status > 299) {
|
||||
// Stop polling when we get errors
|
||||
return;
|
||||
}
|
||||
|
||||
// Schedule the next request when the current one's complete
|
||||
livestatsRefreshTimeouts[index] = window.setTimeout(worker, timer);
|
||||
}
|
||||
});
|
||||
@@ -128,7 +133,7 @@ $.when( $.ready ).then(function() {
|
||||
});
|
||||
$('#sortable').sortable('disable');
|
||||
|
||||
$('#sortable').on('mouseenter', '.item', function () {
|
||||
$('#main').on('mouseenter', '#sortable.ui-sortable-disabled .item', function () {
|
||||
$(this).siblings('.tooltip').addClass('active')
|
||||
$('.refresh', this).addClass('active')
|
||||
}).on('mouseleave', '.item', function () {
|
||||
@@ -181,8 +186,10 @@ $.when( $.ready ).then(function() {
|
||||
$('.add-item').hide();
|
||||
$('.item-edit').hide();
|
||||
$('#app').removeClass('sidebar');
|
||||
$('#sortable .tooltip').css('display', '')
|
||||
$('#sortable').sortable('disable');
|
||||
} else {
|
||||
$('#sortable .tooltip').css('display', 'none')
|
||||
$('#sortable').sortable('enable');
|
||||
setTimeout(function() {
|
||||
$('.add-item').fadeIn();
|
||||
|
||||
Reference in New Issue
Block a user