loader.js: Push failed requests to history
The commitae68e8aec4
reverted earlier seems to be supposed to do exactly what this one does now. Prior, the commitsae68e8aec4
and8bb0e4e0a0
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:
parent
b4fe91bb2f
commit
3098c21c17
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue