summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2019-02-24 07:30:10 -0500
committerPliable Pixels <pliablepixels@gmail.com>2019-02-24 07:30:10 -0500
commit780af74c266b5531905d6890232685e5e5368571 (patch)
treee6cfbf9858a9975faf84b415e93d308e4b937512 /www/js
parenta7eb5ec2141c585c7d4eba7a49290d5cf1abe560 (diff)
nits
Diffstat (limited to 'www/js')
-rw-r--r--www/js/MomentCtrl.js4
-rw-r--r--www/js/NVR.js2
-rwxr-xr-xwww/js/app.js39
3 files changed, 6 insertions, 39 deletions
diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js
index 3b7a83ce..06294a16 100644
--- a/www/js/MomentCtrl.js
+++ b/www/js/MomentCtrl.js
@@ -5,7 +5,6 @@
/* global cordova,StatusBar,angular,console, Masonry */
-//https:///zm/api/events/index/AlarmFrames%20%3E=:1/StartTime%20%3E=:2017-12-16%2009:08:50.json?sort=TotScore&direction=desc
angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$rootScope', '$ionicModal', 'NVR', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$translate', '$templateRequest', '$sce', '$compile', '$http', '$ionicLoading', 'zm', '$timeout', '$q', '$ionicPopover', '$ionicPopup', 'message', '$ionicScrollDelegate', function ($scope, $rootScope, $ionicModal, NVR, $ionicSideMenuDelegate, $ionicHistory, $state, $translate, $templateRequest, $sce, $compile, $http, $ionicLoading, zm, $timeout, $q, $ionicPopover, $ionicPopup, message, $ionicScrollDelegate) {
@@ -747,9 +746,6 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
NVR.debug("Moments from " + timeFrom + " to " + timeTo);
- // format:
- //https:///zm/api/events/index/AlarmFrames%20%3E=:1/StartTime%20%3E=:2017-12-16%2009:08:50.json?sort=TotScore&direction=desc
-
var ld = NVR.getLogin();
// in API, always sort by StartTime so all monitors are represented
diff --git a/www/js/NVR.js b/www/js/NVR.js
index 6901ff82..481d8512 100644
--- a/www/js/NVR.js
+++ b/www/js/NVR.js
@@ -339,7 +339,7 @@ angular.module('zmApp.controllers')
log("Got min streaming port value of: " + configParams.ZM_MIN_STREAMING_PORT);
} else {
setCurrentServerMultiPortSupported(false);
- log("ZM_MIN_STREAMING_PORT not configure, disabling");
+ log("ZM_MIN_STREAMING_PORT not configured, disabling");
configParams.ZM_MIN_STREAMING_PORT = 0;
}
diff --git a/www/js/app.js b/www/js/app.js
index ffd456fe..9e9b61ad 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -651,50 +651,21 @@ angular.module('zmApp', [
if (!config) return config;
if (!config.url) return config;
-
-
if ($rootScope.basicAuthHeader) {
- // console.log ("BASIC AUTH="+$rootScope.basicAuthHeader);
+
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);
- /* var components = URI.parse(config.url);
- var credentials = btoa(components.userinfo);
- var authorization = {'Authorization': 'Basic ' + credentials};
- config.headers.Authorization = 'Basic ' + credentials;
- console.log ("Full headers: " + JSON.stringify(config.headers));
- config.url = components.scheme + "://" + components.host;
- if (components.port) config.url = config.url + ":" + components.port;
- if (components.path) config.url = config.url + components.path;
-
- console.log ("REWRITING URL TO: "+config.url);} */
-
-
-
- //console.log (">>>>>>>>>>>>> INTERCEPT OBJECT " + JSON.stringify(config));
-
- // if ($rootScope.zmCookie) {
- // config.headers.Cookie = "ZMSESSID=" + // $rootScope.zmCookie;
- // console.log (">>>>> WOOOT HAVE COOKIE AND USING: "+$rootScope.zmCookie);
- // } else {
- // console.log ("No cookie present in " + config.url);
- // }
-
- // if ($rootScope.apiAuth) {
- // console.log("********** API AUTH");
- /*if (config.url.indexOf("/api/") > -1) {
- config.url = config.url + "&auth=" + $rootScope.authSession;*/
- // console.log("********** API AUTH muggled to:" + 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) ||
@@ -705,7 +676,7 @@ angular.module('zmApp', [
// these can take time, so lets bump up timeout
config.timeout = zm.largeHttpTimeout;
- }
+ }*/
return config;
},