diff options
| author | PliablePixels <pliablepixels@gmail.com> | 2015-08-28 11:52:59 -0400 |
|---|---|---|
| committer | PliablePixels <pliablepixels@gmail.com> | 2015-08-28 11:52:59 -0400 |
| commit | b9f387782bf9ea222d52eac954f1bddad8131391 (patch) | |
| tree | 94e349c9e2ff709237e32adf0cc9f25632391874 /www/js/ModalCtrl.js | |
| parent | 4332c99d924cd00b6a6e5f1b306db8da58b2ab59 (diff) | |
Implemented auth key into the app so each image refresh in Montage and Monitor view does not hit the ZM DB and generate a million records. Solves the log pings of https://github.com/pliablepixels/zmNinja/issues/26
Diffstat (limited to 'www/js/ModalCtrl.js')
| -rw-r--r-- | www/js/ModalCtrl.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js index 24926641..3cb2787d 100644 --- a/www/js/ModalCtrl.js +++ b/www/js/ModalCtrl.js @@ -34,6 +34,34 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco document.addEventListener("pause", onPause, false); document.addEventListener("resume", onResume, false); + $rootScope.authSession = "undefined"; + $ionicLoading.show({ + template: 'negotiating stream authentication...', + animation: 'fade-in', + showBackdrop: true, + duration: zm.loadingTimeout, + maxWidth: 300, + showDelay: 0 + }); + var ld = ZMDataModel.getLogin(); + ZMDataModel.getAuthKey() + .then(function(success) + { + $ionicLoading.hide(); + $rootScope.authSession = success; + ZMDataModel.zmLog ("Modal: Stream authentication construction: " + $rootScope.authSession); + + }, + function (error) + { + + $ionicLoading.hide(); + console.log (error); + //$rootScope.authSession=""; + ZMDataModel.zmLog ("Modal: Error returned Stream authentication construction. Retaining old value of: " + $rootScope.authSession); + }); + + $scope.radialMenuOptions = { content: '', |
