From 67f4ac16d5a82e00e48825944868d1a722af2dd4 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 10 Apr 2015 00:33:50 +0100 Subject: [PATCH] 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 --- etc/status/public_html/jquery.zuul.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etc/status/public_html/jquery.zuul.js b/etc/status/public_html/jquery.zuul.js index 40a5d4dce4..8069b2f7dc 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')