loader.js: Push failed requests to history

The commit ae68e8aec42703c988ca2d5f2620e8a23ac4e4b1 reverted
earlier seems to be supposed to do exactly what this one does now.
Prior, the commits ae68e8aec42703c988ca2d5f2620e8a23ac4e4b1 and
8bb0e4e0a0ba9d3924a16f3f569ee38cbda0291c 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

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
*/