Status: Don't raise "abort" as error to the user
If the request was aborted, the failure should not be presented
to the user as nothing actually went wrong.
This happens when a request is not finished when next 'update'
starts. This is amplified by the page visibility events that
will start an 'update' loop prematurely.
Without this, switching between tabs often causes the user to
see a "status.json: abort" message when they come back to the
dashboard.
Also remove redundant (and incorrectly labeled) arguments.
Change-Id: I834384535f8d04d1274336bc993c20035be01d60
diff --git a/etc/status/public_html/jquery.zuul.js b/etc/status/public_html/jquery.zuul.js
index 40a5d4d..8069b2f 100644
--- a/etc/status/public_html/jquery.zuul.js
+++ b/etc/status/public_html/jquery.zuul.js
@@ -682,7 +682,10 @@
data.result_event_queue.length : '0'
);
})
- .fail(function (err, jqXHR, errMsg) {
+ .fail(function (jqXHR, statusText, errMsg) {
+ if (statusText === 'abort') {
+ return;
+ }
$msg.text(options.source + ': ' + errMsg)
.addClass('alert-danger')
.removeClass('zuul-msg-wrap-off')