1
0
Fork 0

offline check recognizes 401 unauthorized [ci skip]

This commit is contained in:
hkernbach 2016-06-17 09:10:51 +02:00
parent abb1073a6b
commit 3ab49b687d
1 changed files with 12 additions and 6 deletions

View File

@ -192,12 +192,18 @@
self.render();
}
},
error: function () {
self.isOffline = true;
self.isOfflineCounter++;
if (self.isOfflineCounter >= 1) {
//arangoHelper.arangoError("Server", "Server is offline");
self.showServerStatus(false);
error: function (jqXHR) {
if (jqXHR.status === 401) {
self.showServerStatus(true);
window.App.navigate("login", {trigger: true});
}
else {
self.isOffline = true;
self.isOfflineCounter++;
if (self.isOfflineCounter >= 1) {
//arangoHelper.arangoError("Server", "Server is offline");
self.showServerStatus(false);
}
}
}
});