diff options
| author | ARC <arjunrc@gmail.com> | 2015-05-02 16:36:34 -0400 |
|---|---|---|
| committer | ARC <arjunrc@gmail.com> | 2015-05-02 16:36:34 -0400 |
| commit | 3eb690e300d797433455c1fcbd9a769c15aa9d7c (patch) | |
| tree | f366512aedac1bba31bf22e440edf49e7003bcf3 /www/js/DataModel.js | |
| parent | 9faf95be527b8b7c23e4ed4226c35bb771129f41 (diff) | |
Android Users Rejoice! Major updates: Android port works like a charm now. Integrated Crosswalk for good performance for Android phones, reworked Montage view to step around Chrome's problem of getting stuck in pending state for HTTP requests that don't close soon and more.
Diffstat (limited to 'www/js/DataModel.js')
| -rw-r--r-- | www/js/DataModel.js | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index b0ae8ca3..e44fedb6 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -47,7 +47,6 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion }); } - // console.log ("Simulated: "+JSON.stringify(simmonitors)); return simmonitors; }, @@ -187,7 +186,7 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion template: 'Loading Monitors...', animation: 'fade-in', showBackdrop: true, - duration:10000, + duration:15000, maxWidth: 200, showDelay: 0 }); @@ -197,7 +196,7 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion console.log("ZMDataModel: Invoking HTTP get to load monitors"); var apiurl = loginData.apiurl; var myurl = apiurl + "/monitors.json"; - $http.get(myurl, {timeout:10000}) + $http.get(myurl /*,{timeout:15000}*/) .success(function (data) { //console.log("HTTP success got " + JSON.stringify(data.monitors)); monitors = data.monitors; @@ -256,7 +255,7 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion showBackdrop: true, maxWidth: 200, showDelay: 0, - duration:10000, //specifically for Android - http seems to get stuck at times + duration:15000, //specifically for Android - http seems to get stuck at times }); var d = $q.defer(); @@ -280,7 +279,7 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion return d.promise; } else { // not simulated - $http.get(myurl, {timeout:10000}) + $http.get(myurl /*,{timeout:15000}*/) .success(function (data) { $ionicLoading.hide(); myevents = data.events.reverse(); @@ -342,13 +341,5 @@ angular.module('zmApp.controllers').service('ZMDataModel', ['$http', '$q', '$ion return "(Unknown)"; }, - getMontageImagePath: function () { - - var path = "{{LoginData.url}}/cgi-bin/nph-zms?mode=jpeg&monitor={{monitor.Monitor.Id}}&scale=100&maxfps=3&buffer=1000&user={{LoginData.username}}&pass={{LoginData.password}}&rand={{rand}}"; - - return (path); - } - - }; }]); |
