summaryrefslogtreecommitdiff
path: root/www/js/DataModel.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-08-17 09:47:59 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-08-17 09:47:59 -0400
commit43df6a5c001540690df76a888f42c64fc3310115 (patch)
tree4b7cff6689485002ffafcfeb70454d287a2543c9 /www/js/DataModel.js
parent548c4cf8662e0c7b64cb84ff038a7fc548144cd2 (diff)
#681 make sure falllback happens in reasonable time, also improve progress messages to keep user updated
Diffstat (limited to 'www/js/DataModel.js')
-rwxr-xr-xwww/js/DataModel.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 49fb2460..26c3cd3b 100755
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -2644,6 +2644,13 @@ angular.module('zmApp.controllers')
logout: function () {
// always resolves
+
+ $ionicLoading.show({
+ template: $translate.instant('kCleaningUp'),
+ noBackdrop: true,
+
+ });
+
var d = $q.defer();
log(loginData.url + "=>Logging out of any existing ZM sessions...");
$rootScope.authSession = "undefined";
@@ -2654,14 +2661,16 @@ angular.module('zmApp.controllers')
if (loginData.currentServerVersion && (versionCompare(loginData.currentServerVersion, zm.versionWithLoginAPI) != -1 || loginData.loginAPISupported)) {
debug ("Logging out using API method");
- $http.get(loginData.apiurl+'/host/logout.json')
+ $http.get(loginData.apiurl+'/host/logout.json',{timeout: 7000})
.then (function(s) {
debug ("Logout returned... ");
d.resolve(true);
+ $ionicLoading.hide();
return d.promise;
},
function (e) {
debug ("Logout errored but really don't worry, your ZM version may not support it");
+ $ionicLoading.hide();
d.resolve(true);
return d.promise;
}
@@ -2674,7 +2683,7 @@ angular.module('zmApp.controllers')
debug ("Logging out using Web method");
$http({
method: 'POST',
- timeout: 10000,
+ timeout: 7000,
//withCredentials: true,
url: loginData.url + '/index.php',
headers: {