mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
Do not hammer web server on auto-refreshing failures
This commit is contained in:
parent
632616671d
commit
8d888b3396
@ -316,11 +316,8 @@
|
|||||||
|
|
||||||
var refresh = req.getResponseHeader('X-Icinga-Refresh');
|
var refresh = req.getResponseHeader('X-Icinga-Refresh');
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
// Hmmmm... .data() doesn't work here?
|
|
||||||
req.$target.data('lastUpdate', (new Date()).getTime());
|
|
||||||
req.$target.data('icingaRefresh', refresh);
|
req.$target.data('icingaRefresh', refresh);
|
||||||
} else {
|
} else {
|
||||||
req.$target.removeData('icingaRefresh');
|
|
||||||
req.$target.removeData('lastUpdate');
|
req.$target.removeData('lastUpdate');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -415,6 +412,7 @@
|
|||||||
* Regardless of whether a request succeeded of failed, clean up
|
* Regardless of whether a request succeeded of failed, clean up
|
||||||
*/
|
*/
|
||||||
onComplete: function (req, textStatus) {
|
onComplete: function (req, textStatus) {
|
||||||
|
req.$target.data('lastUpdate', (new Date()).getTime());
|
||||||
delete this.requests[req.$target.attr('id')];
|
delete this.requests[req.$target.attr('id')];
|
||||||
this.icinga.ui.fadeNotificationsAway();
|
this.icinga.ui.fadeNotificationsAway();
|
||||||
this.icinga.ui.refreshDebug();
|
this.icinga.ui.refreshDebug();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user