summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2019-05-20 10:43:06 -0400
committerPliable Pixels <pliablepixels@gmail.com>2019-05-20 10:43:06 -0400
commit5aee4039af90cc6b5c372076daa1d5ada9596075 (patch)
tree181be75ee0f0df67940cb1d78276476b18bf1f3b
parent1e4c404d3a0657840acdf143e27fdc6ede6f81b5 (diff)
demote logs
-rw-r--r--www/index.html2
-rw-r--r--www/js/BookmarkCtrl.js2
-rw-r--r--www/js/DevOptionsCtrl.js2
-rw-r--r--www/js/EventDateTimeFilterCtrl.js2
-rw-r--r--www/js/LoginCtrl.js1
-rw-r--r--www/js/MomentCtrl.js4
-rw-r--r--www/js/MonitorModalCtrl.js6
-rw-r--r--www/js/MontageCtrl.js4
-rw-r--r--www/js/MontageHistoryCtrl.js4
-rw-r--r--www/js/NVR.js22
-rw-r--r--www/js/StateCtrl.js2
-rw-r--r--www/js/TimelineCtrl.js2
-rw-r--r--www/js/WizardCtrl.js9
-rwxr-xr-xwww/js/app.js2
14 files changed, 37 insertions, 27 deletions
diff --git a/www/index.html b/www/index.html
index d7f0e9bf..e07749a0 100644
--- a/www/index.html
+++ b/www/index.html
@@ -147,7 +147,7 @@
window.ionic.Platform.ready(function () {
- console.log("******* PLATFORM READY ****");
+ // console.log("******* PLATFORM READY ****");
angular.bootstrap(document, ['zmApp']);
});
diff --git a/www/js/BookmarkCtrl.js b/www/js/BookmarkCtrl.js
index 57de1ccd..b36fae69 100644
--- a/www/js/BookmarkCtrl.js
+++ b/www/js/BookmarkCtrl.js
@@ -95,7 +95,7 @@ angular.module('zmApp.controllers').controller('zmApp.BookmarkCtrl', ['$scope',
disableAnimate: true,
expire: 300
});
- console.log("GOIN WITH " + JSON.stringify(item.params));
+ //console.log("GOIN WITH " + JSON.stringify(item.params));
$state.go(item.state, item.params);
};
diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js
index 57aceff4..55aa0e5b 100644
--- a/www/js/DevOptionsCtrl.js
+++ b/www/js/DevOptionsCtrl.js
@@ -63,7 +63,7 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope'
//console.log("**VIEW ** DevOptions Ctrl Entered");
$scope.loginData = NVR.getLogin();
- console.log("DEV LOGS=" + $scope.loginData.enableLogs);
+ //console.log("DEV LOGS=" + $scope.loginData.enableLogs);
$scope.isMultiPort = false;
diff --git a/www/js/EventDateTimeFilterCtrl.js b/www/js/EventDateTimeFilterCtrl.js
index 51ebe91f..0e5f9988 100644
--- a/www/js/EventDateTimeFilterCtrl.js
+++ b/www/js/EventDateTimeFilterCtrl.js
@@ -124,7 +124,7 @@ angular.module('zmApp.controllers')
disableBack: true
});
- console.log (" >>>>>>>> BACK VIEW = "+$ionicHistory.backTitle());
+ //console.log (" >>>>>>>> BACK VIEW = "+$ionicHistory.backTitle());
if ($ionicHistory.backTitle() == 'Timeline') {
$ionicHistory.nextViewOptions({
diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js
index 53796832..08e7d75c 100644
--- a/www/js/LoginCtrl.js
+++ b/www/js/LoginCtrl.js
@@ -653,6 +653,7 @@ function mobilePinConfig () {
$rootScope.authSession = '';
+ console.log ("***** CLEARING AUTHSESSION IN SAVEITEMS");
if ($rootScope.platformOS != 'desktop') {
diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js
index b9caddff..79454c33 100644
--- a/www/js/MomentCtrl.js
+++ b/www/js/MomentCtrl.js
@@ -324,7 +324,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
var ld = NVR.getLogin();
ld.montageReviewCollapse = $scope.expand;
- console.log(">>>>>>>>> SAVING EXPAND AS:" + $scope.expand);
+ // console.log(">>>>>>>>> SAVING EXPAND AS:" + $scope.expand);
NVR.setLogin(ld);
};
@@ -848,7 +848,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
$scope.expand = ld.montageReviewCollapse;
- console.log(">>>>>>>>> RESTORING EXPAND AS:" + $scope.expand);
+ //console.log(">>>>>>>>> RESTORING EXPAND AS:" + $scope.expand);
$scope.loadingStatus = $translate.instant('kLoading');
diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js
index 169a8b4a..d6411753 100644
--- a/www/js/MonitorModalCtrl.js
+++ b/www/js/MonitorModalCtrl.js
@@ -82,7 +82,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$
$timeout(function () {
var keyCode = evt.keyCode;
- console.log(keyCode + " PRESSED");
+ //console.log(keyCode + " PRESSED");
if (keyCode == keyCodes.ESC) {
@@ -829,7 +829,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$
str.push(encodeURIComponent(p) + "=" +
encodeURIComponent(obj[p]));
var foo = str.join("&");
- console.log("****PTZ RETURNING " + foo);
+ //console.log("****PTZ RETURNING " + foo);
return foo;
},
@@ -1446,7 +1446,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$
str.push(encodeURIComponent(p) + "=" +
encodeURIComponent(obj[p]));
var foo = str.join("&");
- console.log("****CONTROL RETURNING " + foo);
+ //console.log("****CONTROL RETURNING " + foo);
return foo;
},
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 62077328..4834d9e7 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -639,7 +639,7 @@ angular.module('zmApp.controllers')
// console.log ("EVENTS GOT: "+JSON.stringify(data));
var res = data.data;
var mid = monitor.Monitor.Id;
- if (!res.events) res = undefined;
+ if (!res || !res.events) res = undefined;
else if (res.events.length == 0) res = undefined;
monitor.Monitor.lastEvent = res;
@@ -2452,7 +2452,7 @@ angular.module('zmApp.controllers')
}
$scope.squeezeMonitors = function () {
- console.log ("squeezing");
+ NVR.debug ("squeezing");
pckry.once('layoutComplete', resizeComplete);
$timeout(function () {
pckry.layout();
diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js
index 1833ec80..7888c37c 100644
--- a/www/js/MontageHistoryCtrl.js
+++ b/www/js/MontageHistoryCtrl.js
@@ -558,7 +558,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
var str = [];
for (var p in obj) str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
var foo = str.join("&");
- console.log("****HISTORY CONTROL RETURNING " + foo);
+ //console.log("****HISTORY CONTROL RETURNING " + foo);
return foo;
},
data: data_payload
@@ -625,7 +625,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
req.then(function (succ) {
var resp = succ.data;
- console.log ("zms response: " + JSON.stringify(resp));
+ //console.log ("zms response: " + JSON.stringify(resp));
// move progress bar if event id is the same
if (resp.result == "Ok" && ndx != -1 && (resp.status && resp.status.event == $scope.MontageMonitors[ndx].Monitor.eid)) {
diff --git a/www/js/NVR.js b/www/js/NVR.js
index b2360c1c..8768fecf 100644
--- a/www/js/NVR.js
+++ b/www/js/NVR.js
@@ -230,7 +230,7 @@ angular.module('zmApp.controllers')
cordova.plugin.http.setSSLCertMode('nocheck', function () {
debug('--> SSL is permissive, will allow any certs. Use at your own risk.');
}, function () {
- console.log('-->Error setting SSL permissive');
+ NVR.log('-->Error setting SSL permissive');
});
if ($rootScope.platformOS == 'android') {
@@ -463,6 +463,7 @@ angular.module('zmApp.controllers')
setCurrentServerVersion(succ.version);
$ionicLoading.hide();
//$rootScope.loggedIntoZm = 1;
+ //console.log ("***** CLEARING AUTHSESSION IN LINE 466");
$rootScope.authSession = '';
if (succ.refresh_token) {
@@ -537,10 +538,10 @@ angular.module('zmApp.controllers')
},
function (err) {
- console.log("******************* API login error " + JSON.stringify(err));
+ //console.log("******************* API login error " + JSON.stringify(err));
$ionicLoading.hide();
//if (err && err.data && 'success' in err.data) {
- console.log("API based login not supported, need to use web scraping...");
+ NVR.log("API based login not supported, need to use web scraping..."+JSON.stringify(err));
// login using old web scraping
loginData.loginAPISupported = false;
@@ -639,11 +640,13 @@ angular.module('zmApp.controllers')
// Now go ahead and re-get auth key
// if login was a success
+ // console.log ("***** CLEARING AUTHSESSION IN AUTHKEY");
$rootScope.authSession = '';
getAuthKey($rootScope.validMonitorId)
.then(function (success) {
//console.log(success);
+ //console.log ("***** SETTING AUTHSESSION IN AUTHKEY"+success);
$rootScope.authSession = success;
log("Stream authentication construction: " +
$rootScope.authSession);
@@ -727,6 +730,8 @@ angular.module('zmApp.controllers')
},
function (e) {
+
+ //console.log ("***** CLEARING AUTHSESSION IN GETCREDENTIALS");
$rootScope.authSession = "";
d.resolve($rootScope.authSession);
debug("AuthHash API Error: " + JSON.stringify(e));
@@ -2545,7 +2550,7 @@ angular.module('zmApp.controllers')
data = data.data;
// We found a server list API, so lets make sure
// we get the hostname as it will be needed for playback
- log("multi server list loaded:" + JSON.stringify(data));
+ log("multi server list loaded");
multiservers = data.servers;
var multiserver_scheme = "http://";
@@ -2615,8 +2620,8 @@ angular.module('zmApp.controllers')
debug("recording server reported is " + JSON.stringify(m));
- debug("portal parsed is " + JSON.stringify(p));
- debug("streaming url parsed is " + JSON.stringify(s));
+ //debug("portal parsed is " + JSON.stringify(p));
+ //debug("streaming url parsed is " + JSON.stringify(s));
debug("multi-port is:" + zmsPort);
var st = "";
@@ -2845,6 +2850,7 @@ angular.module('zmApp.controllers')
// first see if we can work with access token
if (moment.utc(loginData.accessTokenExpires).isAfter(now) && diff_access >=zm.accessTokenLeewayMin && tryAccess) {
log ("Access token still has "+diff_access+" minutes left, using it");
+ // console.log ("**************** TOKEN SET="+loginData.accessToken);
$rootScope.authSession = '&token='+loginData.accessToken;
d.resolve("Login success via access token");
if (!noBroadcast) $rootScope.$broadcast('auth-success', '' );
@@ -2862,6 +2868,8 @@ angular.module('zmApp.controllers')
.then (function (succ) {
succ = succ.data;
if (succ.access_token) {
+
+ // console.log ("**************** TOKEN SET="+succ.access_token);
$rootScope.authSession = '&token='+succ.access_token;
log ("New access token retrieved: ..."+succ.access_token.substr(-5));
loginData.accessToken = succ.access_token;
@@ -3509,7 +3517,7 @@ angular.module('zmApp.controllers')
log(loginData.url + "=>Logging out of any existing ZM sessions...");
- $rootScope.authSession = "undefined";
+ $rootScope.authSession = "";
// console.log("CURRENT SERVER: " + loginData.currentServerVersion);
diff --git a/www/js/StateCtrl.js b/www/js/StateCtrl.js
index a01d02b2..058fcb53 100644
--- a/www/js/StateCtrl.js
+++ b/www/js/StateCtrl.js
@@ -120,7 +120,7 @@ $scope.toggleServer = function() {
$scope.$on('$ionicView.afterEnter', function () {
// console.log("**VIEW ** Montage Ctrl Entered");
- console.log("STATE SHORTCUT: " + JSON.stringify($stateParams));
+ // console.log("STATE SHORTCUT: " + JSON.stringify($stateParams));
$stateParams.shortcut && $stateParams.shortcut.fn &&
$scope[$stateParams.shortcut.fn]($stateParams.shortcut.fnargs); // jshint ignore:line
diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js
index 13916297..11a61432 100644
--- a/www/js/TimelineCtrl.js
+++ b/www/js/TimelineCtrl.js
@@ -383,7 +383,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla
$timeout(function () {
var keyCode = evt.keyCode;
- console.log(keyCode + " PRESSED");
+ //console.log(keyCode + " PRESSED");
if (keyCode == keyCodes.UP) {
diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js
index 771f3f26..35f83641 100644
--- a/www/js/WizardCtrl.js
+++ b/www/js/WizardCtrl.js
@@ -470,7 +470,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$
data = data.data;
$ionicLoading.hide();
- console.log ("GOT "+data);
+ // console.log ("GOT "+data);
if (data.indexOf(zm.loginScreenString1) >=0 ||
data.indexOf(zm.loginScreenString2) >=0 ) {
@@ -578,7 +578,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$
return d.promise;
}
NVR.debug("API based login returned... ");
- console.log (JSON.stringify(succ));
+ // console.log (JSON.stringify(succ));
$ionicLoading.hide();
//$rootScope.loggedIntoZm = 1;
$rootScope.authSession = '';
@@ -635,13 +635,13 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$
},
function (err) {
- console.log("******************* API login error " + JSON.stringify(err));
+ NVR.debug("******************* API login error " + JSON.stringify(err));
$ionicLoading.hide();
if (1) {
//if (err && err.data && 'success' in err.data) {
- console.log("API based login not supported, need to use web scraping...");
+ NVR.log("API based login not supported, need to use web scraping...");
loginWebScrape(u,zmu,zmp)
.then(function (succ) {
@@ -678,6 +678,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$
function validateData() {
+ //console.log ("***** CLEARING AUTHSESSION IN VALIDATEDATA");
$rootScope.authSession = '';
$rootScope.zmCookie = '';
diff --git a/www/js/app.js b/www/js/app.js
index dd6a3ce4..140c8cad 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -113,7 +113,7 @@ angular.module('zmApp', [
versionWithLoginAPI: "1.31.47",
androidBackupKey: "AEdPqrEAAAAIqF-OaHdwIzZhx2L1WOfAGTagBxm5a1R4wBW_Uw",
accessTokenLeewayMin: 5,
- refreshTokenLeewayMin: 30
+ refreshTokenLeewayMin: 10
})