mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
Revert "Failure requests: Fix auto refresh and history"
This reverts commit 8c758a9f126f81cc50fe290691d284947ec1804d.
This commit is contained in:
parent
a5fe9a1fe1
commit
bc69a3b20f
@ -107,8 +107,7 @@
|
|||||||
url : url,
|
url : url,
|
||||||
data : data,
|
data : data,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
context: self,
|
context: self
|
||||||
failure: false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
req.$target = $target;
|
req.$target = $target;
|
||||||
@ -556,7 +555,7 @@
|
|||||||
// Update history when necessary. Don't do so for requests triggered
|
// Update history when necessary. Don't do so for requests triggered
|
||||||
// by history or autorefresh events
|
// by history or autorefresh events
|
||||||
if (! req.historyTriggered && ! req.autorefresh) {
|
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
|
// We only want to care about top-level containers
|
||||||
if (req.$target.parent().closest('.container').length === 0) {
|
if (req.$target.parent().closest('.container').length === 0) {
|
||||||
this.icinga.history.pushCurrentState();
|
this.icinga.history.pushCurrentState();
|
||||||
@ -592,17 +591,6 @@
|
|||||||
onFailure: function (req, textStatus, errorThrown) {
|
onFailure: function (req, textStatus, errorThrown) {
|
||||||
var url = req.url;
|
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) {
|
if (req.status > 0) {
|
||||||
this.icinga.logger.error(
|
this.icinga.logger.error(
|
||||||
req.status,
|
req.status,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user