loader.js: Push failed requests to history

The commit ae68e8aec4 reverted
earlier seems to be supposed to do exactly what this one does now.
Prior, the commits ae68e8aec4 and
8bb0e4e0a0 were effectively
neutralizing each other. Quick tests of how Web 2 handles failing
requests while interacting with the browser's history were successful.
If this change breaks something else (again?), leave me a note and do
*not* fix it straight away..
This commit is contained in:
Johannes Meyer 2015-07-06 16:56:44 +02:00
parent b4fe91bb2f
commit 3098c21c17
1 changed files with 1 additions and 4 deletions

View File

@ -116,7 +116,6 @@
req.complete(this.onComplete);
req.autorefresh = autorefresh;
req.action = action;
req.failure = false;
req.addToHistory = true;
if (id) {
@ -553,7 +552,7 @@
// Update history when necessary. Don't do so for requests triggered
// by history or autorefresh events
if (! req.autorefresh && req.addToHistory) {
if (req.$target.hasClass('container') && ! req.failure) {
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();
@ -589,8 +588,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
*/