diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MontageCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/NVR.js | 12 | ||||
| -rwxr-xr-x | www/js/app.js | 40 |
3 files changed, 16 insertions, 38 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 37c6f005..53bcb660 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -633,7 +633,7 @@ angular.module('zmApp.controllers') apiurl += '.json?sort=StartTime&direction=desc&limit=1'+$rootScope.authSession; - NVR.debug ("Getting event count using:"+apiurl); + NVR.debug ("Getting event count"); $http.get(apiurl) .then (function (data) { // console.log ("EVENTS GOT: "+JSON.stringify(data)); diff --git a/www/js/NVR.js b/www/js/NVR.js index 0c48330d..3a9e2f25 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -791,31 +791,31 @@ angular.module('zmApp.controllers') } if (typeof loginData.EHpackeryPositions == 'undefined') { - debug("EHpackeryPositions does not exist. Setting to empty"); + //debug("EHpackeryPositions does not exist. Setting to empty"); loginData.EHpackeryPositions = ""; } if (typeof loginData.packerySizes == 'undefined') { - debug("packerySizes does not exist. Setting to empty"); + //debug("packerySizes does not exist. Setting to empty"); loginData.packerySizes = ""; } if (typeof loginData.use24hr == 'undefined') { - debug("use24hr does not exist. Setting to false"); + //debug("use24hr does not exist. Setting to false"); loginData.use24hr = false; } if (typeof timelineModalGraphType == 'undefined') { - debug("timeline graph type not set. Setting to all"); + //debug("timeline graph type not set. Setting to all"); loginData.timelineModalGraphType = $translate.instant('kGraphAll'); //console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + loginData.timelineModalGraphType); } if (typeof loginData.resumeDelay == 'undefined') { - debug("resumeDelay does not exist. Setting to 0"); + //debug("resumeDelay does not exist. Setting to 0"); loginData.resumeDelay = 0; } @@ -1879,7 +1879,7 @@ angular.module('zmApp.controllers') $http.get(apiurl) .then(function (success) { if (success.data.version) { - console.log("API VERSION RETURNED: " + JSON.stringify(success)); + //console.log("API VERSION RETURNED: " + JSON.stringify(success)); $rootScope.apiValid = true; if (versionCompare(success.data.version, '1.32.0') != -1) { diff --git a/www/js/app.js b/www/js/app.js index 303467be..989bd99b 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -654,8 +654,7 @@ angular.module('zmApp', [ //------------------------------------------------------------------ .factory('timeoutHttpIntercept', ['$rootScope', '$q', 'zm', '$injector', function ($rootScope, $q, zm, $injector) { $rootScope.zmCookie = ""; - //console.log ("HHHHHHHHHHHHHH**************************"); - //console.log ("HERE TIMEOUT"); + return { request: function (config) { @@ -667,27 +666,6 @@ angular.module('zmApp', [ config.headers.Authorization = $rootScope.basicAuthHeader; } - // handle basic auth properly - if (config.url.indexOf("@") > -1) { - - NVR.debug(">>>>>>>>>> ERROR!!!!! url has a basic auth u:p!" + config.url); - - } - - // I don't think we need this - do we? - - /* - if ((config.url.indexOf("/api/states/change/") > -1) || - (config.url.indexOf("getDiskPercent.json") > -1) || - (config.url.indexOf("daemonCheck.json") > -1) || - (config.url.indexOf("getLoad.json") > -1)) - - { - - // these can take time, so lets bump up timeout - config.timeout = zm.largeHttpTimeout; - - }*/ return config; }, @@ -1112,7 +1090,7 @@ angular.module('zmApp', [ succ = succ.data; if (succ.access_token) { $rootScope.authSession = '&token='+succ.access_token; - NVR.log ("New access token retrieved:"+succ.access_token); + NVR.log ("New access token retrieved: ..."+succ.access_token.substr(-5)); ld.accessToken = succ.access_token; ld.accessTokenExpires = moment.utc().add(succ.access_token_expires,'seconds'); NVR.log ("Current time is: UTC "+moment.utc().format("YYYY-MM-DD hh:mm:ss")); @@ -1135,8 +1113,8 @@ angular.module('zmApp', [ return proceedWithFreshLogin(); }); } // valid refresh - - } // is token supported + return d.promise; + } // is token supported NVR.log ("Token login not being used"); // coming here means token reloads fell through return proceedWithFreshLogin(); @@ -1225,8 +1203,8 @@ angular.module('zmApp', [ }); return d.promise; } - NVR.debug("API based login returned... "); - console.log (JSON.stringify(succ)); + NVR.debug("API based login returned. "); + //console.log (JSON.stringify(succ)); NVR.setCurrentServerVersion(succ.version); $ionicLoading.hide(); //$rootScope.loggedIntoZm = 1; @@ -1234,7 +1212,7 @@ angular.module('zmApp', [ if (succ.refresh_token) { $rootScope.authSession = '&token='+succ.access_token; - NVR.log ("New refresh token retrieved:"+succ.refresh_token); + NVR.log ("New refresh token retrieved: ..."+succ.refresh_token.substr(-5)); ld.isTokenSupported = true; ld.accessToken = succ.access_token; @@ -2237,7 +2215,7 @@ angular.module('zmApp', [ localforage.getItem('last-desktop-state') .then(function (succ) { - console.log("FOUND STATE" + JSON.stringify(succ) + ":" + succ); + //console.log("FOUND STATE" + JSON.stringify(succ) + ":" + succ); if (succ == null) succ = {name:"app.montage"}; @@ -2281,7 +2259,7 @@ angular.module('zmApp', [ NVR.log("Language file loaded, continuing with rest"); NVR.init(); zmCheckUpdates.start(); - NVR.log("Setting up POST LOGIN timer"); + // NVR.log("Setting up POST LOGIN timer"); zmAutoLogin.start(); setupPauseAndResume(); |
