Revert "Failure requests: Fix auto refresh and history"

This reverts commit 8c758a9f12.
This commit is contained in:
Marius Hein 2015-02-02 16:40:05 +01:00
parent a5fe9a1fe1
commit bc69a3b20f
1 changed files with 2 additions and 14 deletions

View File

@ -107,8 +107,7 @@
url : url,
data : data,
headers: headers,
context: self,
failure: false
context: self
});
req.$target = $target;
@ -556,7 +555,7 @@
// Update history when necessary. Don't do so for requests triggered
// by history or autorefresh events
if (! req.historyTriggered && ! req.autorefresh) {
if (req.$target.hasClass('container') && req.failure === false) {
if (req.$target.hasClass('container')) {
// We only want to care about top-level containers
if (req.$target.parent().closest('.container').length === 0) {
this.icinga.history.pushCurrentState();
@ -592,17 +591,6 @@
onFailure: function (req, textStatus, errorThrown) {
var url = req.url;
req.failure = true;
/*
* Test if a manual actions comes in and autorefresh is active: Stop refreshing
*/
if (! req.historyTriggered && ! req.autorefresh && req.$target.data('icingaRefresh') > 0
&& req.$target.data('icingaUrl') !== url) {
req.$target.data('icingaRefresh', 0);
req.$target.data('icingaUrl', url);
}
if (req.status > 0) {
this.icinga.logger.error(
req.status,