mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
JS/loader: add failed requests to history
It's confusing if they are handled differently
This commit is contained in:
parent
85b1ef096b
commit
06a8803242
@ -401,16 +401,6 @@
|
|||||||
|
|
||||||
req.$target.data('icingaUrl', req.url);
|
req.$target.data('icingaUrl', req.url);
|
||||||
|
|
||||||
// Update history when necessary. Don't do so for requests triggered
|
|
||||||
// by history or autorefresh events
|
|
||||||
if (! req.historyTriggered && ! req.autorefresh) {
|
|
||||||
|
|
||||||
// We only want to care about top-level containers
|
|
||||||
if (req.$target.parent().closest('.container').length === 0) {
|
|
||||||
this.icinga.history.pushCurrentState();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.icinga.ui.initializeTriStates($resp);
|
this.icinga.ui.initializeTriStates($resp);
|
||||||
|
|
||||||
/* Should we try to fiddle with responses containing full HTML? */
|
/* Should we try to fiddle with responses containing full HTML? */
|
||||||
@ -487,6 +477,15 @@
|
|||||||
* 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) {
|
||||||
|
// Update history when necessary. Don't do so for requests triggered
|
||||||
|
// by history or autorefresh events
|
||||||
|
if (! req.historyTriggered && ! req.autorefresh) {
|
||||||
|
// We only want to care about top-level containers
|
||||||
|
if (req.$target.parent().closest('.container').length === 0) {
|
||||||
|
this.icinga.history.pushCurrentState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
req.$target.data('lastUpdate', (new Date()).getTime());
|
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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user