diff options
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/MomentCtrl.js | 4 | ||||
| -rw-r--r-- | www/js/NVR.js | 2 | ||||
| -rwxr-xr-x | www/js/app.js | 39 |
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; }, |
